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

Passing invalid application_id format results in 500 error instead of 422 at /ui/login #68

Closed
fisher60 opened this issue Feb 13, 2024 · 1 comment · Fixed by #71
Closed
Labels
bug Something isn't working

Comments

@fisher60
Copy link
Member

Summary

If an invalid application_id format is given, it results in a 500 internal server error i.e https://auth.abandontech.cloud/ui/login?application_id=fake&callback_uri=/ui

This should ideally raise a 422 Unprocessable Content (if the format is known to be invalid). We should perform some validation on the pydantic model to ensure the UUID is in the correct format. We must also ensure that even if the UUID is believed to be in the correct format, the only other error that can be raised here results in a 404 status. I.e if a bad UUID is passed to prisma, this should result in the application not being found, not a 500 server error.

The following URL correctly results in a 404 as it is a valid UUID format, but does not correspond to a real application: https://auth.abandontech.cloud/ui/login?application_id=cd022be1-35af-4248-8d70-4205ed1c20c7&callback_uri=/ui

@Lopkop
Copy link
Contributor

Lopkop commented Apr 4, 2024

#71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants