mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Prevented a future accidental XSS vulnerability in Server UUID parsing
The server parameter was passed to an exception that is currently turned into json, but in the future the way this exception is handled could have changed.
This commit is contained in:
parent
5c49e95c7d
commit
d64a967497
@ -57,7 +57,7 @@ public class Identifiers {
|
||||
|
||||
Optional<UUID> parsed = UUIDUtility.parseFromString(identifier);
|
||||
return parsed.orElseGet(() -> getServerUUIDFromName(identifier).orElseThrow(
|
||||
() -> new BadRequestException("Given 'server' was not found in the database: '" + identifier + "'")
|
||||
() -> new BadRequestException("Given 'server' was not found in the database.")
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user