From 26a11ffb4c7e5a4c75b35ad783916a3a7292bc4e Mon Sep 17 00:00:00 2001 From: TheFocusDev Date: Fri, 30 May 2025 21:43:04 +0200 Subject: [PATCH] Remove redundant check in ID validation logic --- src/main/java/me/lucko/bytebin/http/GetHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/lucko/bytebin/http/GetHandler.java b/src/main/java/me/lucko/bytebin/http/GetHandler.java index d514c0e..a916dd6 100644 --- a/src/main/java/me/lucko/bytebin/http/GetHandler.java +++ b/src/main/java/me/lucko/bytebin/http/GetHandler.java @@ -71,7 +71,7 @@ public GetHandler(BytebinServer server, LogHandler logHandler, RateLimiter rateL public CompletableFuture apply(@Nonnull Context ctx) { // get the requested path String path = ctx.path("id").value(); - if (path.trim().isEmpty() || path.contains(".") || TokenGenerator.INVALID_TOKEN_PATTERN.matcher(path).find()) { + if (path.trim().isEmpty() || TokenGenerator.INVALID_TOKEN_PATTERN.matcher(path).find()) { throw new StatusCodeException(StatusCode.NOT_FOUND, "Invalid path"); }