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

Incorrect padding error #174

Open
marosrojis opened this issue May 2, 2024 · 0 comments
Open

Incorrect padding error #174

marosrojis opened this issue May 2, 2024 · 0 comments

Comments

@marosrojis
Copy link

Hi,
it the past it worked well. But now I have problem with using openconnect-sso. I get this error:

Traceback (most recent call last):
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/openconnect_sso/app.py", line 35, in run
    auth_response, selected_profile = asyncio.get_event_loop().run_until_complete(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/openconnect_sso/app.py", line 121, in _run
    if credentials and not credentials.totp:
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/openconnect_sso/config.py", line 129, in totp
    return pyotp.TOTP(totpsecret).now() if totpsecret else None
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/pyotp/totp.py", line 64, in now
    return self.generate_otp(self.timecode(datetime.datetime.now()))
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/pyotp/otp.py", line 35, in generate_otp
    hasher = hmac.new(self.byte_secret(), self.int_to_bytestring(input), self.digest)
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/pyotp/otp.py", line 52, in byte_secret
    return base64.b32decode(secret, casefold=True)
  File "/usr/lib/python3.10/base64.py", line 253, in b32decode
    return _b32decode(_b32alphabet, s, casefold, map01)
  File "/usr/lib/python3.10/base64.py", line 239, in _b32decode
    raise binascii.Error('Incorrect padding')
binascii.Error: Incorrect padding

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/maros/.local/bin/openconnect-sso", line 8, in <module>
    sys.exit(main())
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/openconnect_sso/cli.py", line 175, in main
    return app.run(args)
  File "/home/maros/.local/pipx/venvs/openconnect-sso/lib/python3.10/site-packages/openconnect_sso/app.py", line 42, in run
    msg, retval = e.args
ValueError: not enough values to unpack (expected 2, got 1)

Do you have any idea why and how can I fix it?

Thank you for your help.

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