From d64a967497bd95ff1a05056a7f104793fc32da69 Mon Sep 17 00:00:00 2001 From: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com> Date: Sun, 24 Jan 2021 11:03:01 +0200 Subject: [PATCH] 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. --- .../java/com/djrapitops/plan/identification/Identifiers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/identification/Identifiers.java b/Plan/common/src/main/java/com/djrapitops/plan/identification/Identifiers.java index 52c2001c8..a61755a05 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/identification/Identifiers.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/identification/Identifiers.java @@ -57,7 +57,7 @@ public class Identifiers { Optional 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.") )); }