Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/adobepass.py (Python)

Code before:
                        'ident': username,
                        'device': 'web',
                        'send_confirm_link': False,
                        'send_token': True,
                        'device_ident': f'web-{uuid.uuid4().hex}',
                        'include_login_link': True,
                    }

                    self._download_json_handle(
                        'https://idp.philo.com/auth/init/login_code', video_id,
                        note='Requesting Philo auth code', data=json.dumps(philo_ident_payload).encode('utf-8'),
                        headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    philo_code = getpass.getpass('Type auth code you have received [Return]: ')

                    update_code_payload = {'token': philo_code}
                    self._download_json_handle(
                        'https://idp.philo.com/auth/update/login_code', video_id,
                        note='Submitting token', data=json.dumps(update_code_payload).encode('utf-8'),
                        headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    mvpd_confirm_page_res = self._download_webpage_handle('https://idp.philo.com/idp/submit', video_id, 'Confirming Philo Login')
                    post_form(mvpd_confirm_page_res, 'Confirming Login')
                elif mso_id == 'Verizon':
                    # In general, if you're connecting from a Verizon-assigned IP,
                    # you will not actually pass your credentials.
                    provider_redirect_page, urlh = provider_redirect_page_res
                    # From non-Verizon IP, still gave 'Please wait', but noticed N==Y; will need to try on Verizon IP
                    if 'Please wait ...' in provider_redirect_page and '\'N\'== "Y"' not in provider_redirect_page:
                        saml_redirect_url = self._html_search_regex(
                            r'self\.parent\.location=(["\'])(?P<url>.+?)\1',
                            provider_redirect_page,
                            'SAML Redirect URL', group='url')
                        saml_login_page = self._download_webpage(
                            saml_redirect_url, video_id,
                            'Downloading SAML Login Page')
                    elif 'Verizon FiOS - sign in' in provider_redirect_page:
                        # FXNetworks from non-Verizon IP
                        saml_login_page_res = post_form(
                            provider_redirect_page_res, 'Logging in', {
                                mso_info['username_field']: username,
                                mso_info['password_field']: password,
                            }, validate_url=True)
                        saml_login_page, urlh = saml_login_page_res
                        if 'Please try again.' in saml_login_page:

Review comment (security):
same as above
```suggestion
                    self._request_webpage(
                        'https://idp.philo.com/auth/update/login_code', video_id,
                        'Submitting token', data=json.dumps({'token': philo_code}).encode(),
                        headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })
```

Code after:
                        'https://idp.philo.com/auth/init/login_code', video_id,
                        'Requesting Philo auth code', data=json.dumps({
                            'ident': username,
                            'device': 'web',
                            'send_confirm_link': False,
                            'send_token': True,
                            'device_ident': f'web-{uuid.uuid4().hex}',
                            'include_login_link': True,
                        }).encode(), headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    philo_code = getpass.getpass('Type auth code you have received [Return]: ')
                    self._request_webpage(
                        'https://idp.philo.com/auth/update/login_code', video_id,
                        'Submitting token', data=json.dumps({'token': philo_code}).encode(),
                        headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    mvpd_confirm_page_res = self._download_webpage_handle('https://idp.philo.com/idp/submit', video_id, 'Confirming Philo Login')
                    post_form(mvpd_confirm_page_res, 'Confirming Login')
                elif mso_id == 'Verizon':
                    # In general, if you're connecting from a Verizon-assigned IP,
                    # you will not actually pass your credentials.
                    provider_redirect_page, urlh = provider_redirect_page_res
                    # From non-Verizon IP, still gave 'Please wait', but noticed N==Y; will need to try on Verizon IP
                    if 'Please wait ...' in provider_redirect_page and '\'N\'== "Y"' not in provider_redirect_page:
                        saml_redirect_url = self._html_search_regex(
                            r'self\.parent\.location=(["\'])(?P<url>.+?)\1',
                            provider_redirect_page,
                            'SAML Redirect URL', group='url')
                        saml_login_page = self._download_webpage(
                            saml_redirect_url, video_id,
                            'Downloading SAML Login Page')
                    elif 'Verizon FiOS - sign in' in provider_redirect_page:
                        # FXNetworks from non-Verizon IP
                        saml_login_page_res = post_form(
                            provider_redirect_page_res, 'Logging in', {
                                mso_info['username_field']: username,
                                mso_info['password_field']: password,
                            }, validate_url=True)
                        saml_login_page, urlh = saml_login_page_res
                        if 'Please try again.' in saml_login_page:
                            raise ExtractorError(
                                'We\'re sorry, but either the User ID or Password entered is not correct.')
                    else:
                        # ABC from non-Verizon IP
                        saml_redirect_url = self._html_search_regex(