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

Don't raise error when algorithm is not support #746

Closed
wants to merge 3 commits into from
Closed

Don't raise error when algorithm is not support #746

wants to merge 3 commits into from

Conversation

oddbeck
Copy link

@oddbeck oddbeck commented Apr 7, 2022

Instead of raising an error for not supported algorithm we log the warning, and continue with other algorithms/keys

Instead of raising an error for not supported algorithm we log the warning, and continue with other algorithms/keys
Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the build failures please

@oddbeck
Copy link
Author

oddbeck commented Apr 7, 2022

I'm off for the easter holydays without a computer, will look into it in a week.

Comment on lines 49 to +56
if not self.Algorithm:
raise PyJWKError("Unable to find a algorithm for key: %s" % self._jwk_data)
import logging

self.key = self.Algorithm.from_jwk(self._jwk_data)
self.key = None
logger = logging.getLogger(__name__)
logger.warning("Do not support algorithm %s", algorithm)
else:
self.key = self.Algorithm.from_jwk(self._jwk_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might have security implications, as users of this class likely expect the algorithm in the JWK data to be valid.

@DaGuich
Copy link
Contributor

DaGuich commented May 28, 2022

Should be fixed with #762
Sorry, I've seen the PR too late

@github-actions github-actions bot added the stale Issues without activity for more than 60 days label Jul 28, 2022
@github-actions github-actions bot closed this Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues without activity for more than 60 days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants