PreAuthorise
throws AuthenticationCredentialsNotFoundException when a UUID finishes with a space.
#16626
Labels
PreAuthorise
throws AuthenticationCredentialsNotFoundException when a UUID finishes with a space.
#16626
Describe the bug
A path variable which has type
UUID
and is referenced inhasPermission
will throw anAuthenticationCredentialsNotFoundException
when it has a space (%20) at the start or end of a valid UUID. Instead of being treated as an invalid UUID.This occurs regardless of if the user is authenticated correctly or not.
To Reproduce
Steps to reproduce the behavior.
hasPermission
referencing a path variable that is a UUID.%20
after the end of a valid UUID e.g.property/8ceaa391-954b-45d3-a8c4-de81a12fc2db%20/todo/
Note that this only occurs if the character is something that
String.trim()
removes, if the character is at the end or start of the URL. It does not occur if the space is anywhere else in the UUID or for other special characters such as-
or.
.Expected behavior
It should return a
400
error (behave the same way as any other invalid UUID value does in that part of the path).However treating it as a valid UUID ignoring the space would also be acceptable.
Sample
If needed I can probably create a proper sample on Monday.
Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.
The text was updated successfully, but these errors were encountered: