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:
Risto Lahtela 2021-01-24 11:03:01 +02:00
parent 5c49e95c7d
commit d64a967497

View File

@ -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.")
));
}