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

Bug in token refresh logic makes library practically unusable #2

Open
joxl opened this issue Jul 25, 2021 · 0 comments
Open

Bug in token refresh logic makes library practically unusable #2

joxl opened this issue Jul 25, 2021 · 0 comments

Comments

@joxl
Copy link

joxl commented Jul 25, 2021

There is a bug in the token refresh logic that results in permanent silent failure. This makes the entire ebapi library pointless to use because authorization tokens require frequent refreshes.

Calling the refresh() method on a FileTokens instances (used by ApiConnection) results in a NameError, but is masked by a try/except block that ignores any instance of Exception that it catches.

Comment added in code snippet below (copied from tokens.py here) identifies where the bug is located:

# snip
try:
    self.user.loc[idx] = refresh_token(ref)  # <-- refresh_token() is not defined (NameError)
except Exception:
    pass  # <-- bug is completely silenced
# snip
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