diff --git a/src/icloudpd/authentication.py b/src/icloudpd/authentication.py index a6c802949..2122afb8a 100644 --- a/src/icloudpd/authentication.py +++ b/src/icloudpd/authentication.py @@ -163,7 +163,7 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: code = click.prompt( "Please enter two-factor authentication code", type=click.IntRange( - 0, + 100000, 999999)) if not icloud.validate_2fa_code(str(code)): logger.error("Failed to verify two-factor authentication code") diff --git a/src/pyicloud_ipd/sms.py b/src/pyicloud_ipd/sms.py index b792315eb..9db9eadc5 100644 --- a/src/pyicloud_ipd/sms.py +++ b/src/pyicloud_ipd/sms.py @@ -166,7 +166,7 @@ def build_verify_sms_code_request(context: _TrustedPhoneContextProvider, device_ **_oauth_redirect_header(context.domain), **_oauth_headers(context.oauth_session), ** {"Content-type": "application/json"}, - # ** {"Accept": "application/json"}, + ** {"Accept": "application/json"}, }, json = json) return req