Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on authorization with duo hardware token #478

Open
yermalov-here opened this issue Sep 26, 2024 · 0 comments
Open

Exception on authorization with duo hardware token #478

yermalov-here opened this issue Sep 26, 2024 · 0 comments

Comments

@yermalov-here
Copy link

When trying to generate keys using Duo Universal login having a hardware token as the only device registered gimme-aws-creds throws and exception when parsing the login form data.

This happens as the login-form doesn't contain a "preferred_device" input.

Expected Behavior

Current Behavior

The following exception is thrown

  File "***/python3.10/site-packages/gimme_aws_creds/duo_universal.py", line 172, in _get_duo_universal_login_form_data
    preferred_device = self._find_device_to_use(doc)
  File "***/python3.10/site-packages/gimme_aws_creds/duo_universal.py", line 185, in _find_device_to_use
    device = doc.find('.//input[@name="preferred_device"]').get('value')
AttributeError: 'NoneType' object has no attribute 'get' 

This happens as the login-form doesn't contain a "preferred_device" input.

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • App Version used: 2.8.1
  • Environment name and version: python3.10
  • Operating System and version: Ubuntu 22.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant