Skip to content

Conversation

ikarius
Copy link

@ikarius ikarius commented Mar 31, 2025

A possible fix for #548 + simple content-type test

@ikarius
Copy link
Author

ikarius commented Apr 11, 2025

Mmm, e2e testing is failing, but it does not seem to be code related :

    raise DriverNotFoundError(f"Driver for {driver_name} was not found.")
splinter.exceptions.DriverNotFoundError: Driver for firefox was not found.
``

Copy link

@qbey qbey left a comment

Choose a reason for hiding this comment

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

🙏

@@ -279,6 +279,12 @@ def get_userinfo(self, access_token, id_token, payload):
proxies=self.get_settings("OIDC_PROXY", None),
)
user_response.raise_for_status()

if user_response.headers.get("content-type", "").startswith("application/jwt"):
Copy link

Choose a reason for hiding this comment

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

MIME types are case-insensitive you may want to be also?

MIME types are case-insensitive but are traditionally written in lowercase. The parameter values can be case-sensitive.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types

Suggested change
if user_response.headers.get("content-type", "").startswith("application/jwt"):
if user_response.headers.get("content-type", "").lower().startswith("application/jwt"):

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

Successfully merging this pull request may close these issues.

2 participants