Browse Source

enhanced request URI with URLEncoder for errorCode

Jan-Peter Klein 1 year ago
parent
commit
666cd4a4f0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/java/org/cryptomator/ui/error/ErrorController.java

+ 1 - 1
src/main/java/org/cryptomator/ui/error/ErrorController.java

@@ -146,7 +146,7 @@ public class ErrorController implements FxController {
 		askedForLookupDatabasePermission.set(true);
 		HttpClient httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
 		HttpRequest httpRequest = HttpRequest.newBuilder()//
-				.uri(URI.create(ERROR_CODES_URL.formatted(errorCode.toString())))//
+				.uri(URI.create(ERROR_CODES_URL.formatted(URLEncoder.encode(errorCode.toString(),StandardCharsets.UTF_8))))//
 				.build();
 		httpClient.sendAsync(httpRequest, HttpResponse.BodyHandlers.ofInputStream())//
 				.thenAcceptAsync(this::loadHttpResponse, executorService)//