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

Templates fail to render when authorization request doesn't contain a state parameter #2869

Open
matrixbot opened this issue Sep 10, 2024 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @tonkku107 at matrix-org/matrix-authentication-service#2869.

Example authorization request url (fill in the blanks): [mas_base_url]/authorize?response_type=code&client_id=[client_id]&scope=openid

When logged out, an error page is rendered with the following error displayed:
image

Unexpected error
could not render template "pages/login.html"

Render { template: "pages/login.html", source: Error { kind: InvalidOperation, detail: "Could not serialize back parameters", name: "components/back_to_client.html", line: 41, source: Custom("unsupported value") } }

When logged in, an empty error 500 is returned with the following error in the logs:

ERROR http.server.request{otel.kind="server" otel.name="GET /consent/:grant_id" network.protocol.name="http" network.protocol.version="1.0" http.request.method="GET" url.path="/consent/01J0ZS9BWKQ35ZNN9P8ZW8KH5P" url.scheme="http" http.route="/consent/:grant_id" user_agent.original="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"}:handlers.oauth2.consent.get{grant.id=01J0ZS9BWKQ35ZNN9P8ZW8KH5P}: mas_handlers::oauth2::consent: error=could not render template "pages/consent.html"
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