From 44c30bb3833c32cfe37739545891e63501d89948 Mon Sep 17 00:00:00 2001 From: YAlexandrov <72871803+yordanalexandrov@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:06:04 +0300 Subject: [PATCH] GDB-8425 Fix user manipulations with special chars in firefox (#1030) ## What Removed . from fixedEncodeURIComponent function which replaces chars from path params ## Why This causes . to be encoded and spring security has problem with that ## How - removed . from regex --- src/js/angular/rest/security.rest.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/angular/rest/security.rest.service.js b/src/js/angular/rest/security.rest.service.js index b3f523ed1..224791d84 100644 --- a/src/js/angular/rest/security.rest.service.js +++ b/src/js/angular/rest/security.rest.service.js @@ -114,7 +114,7 @@ function SecurityRestService($http) { * @returns {string} The provided string encoded as a URI component. */ function fixedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[.!'()*]/g, function (c) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { return '%' + c.charCodeAt(0).toString(16); }); }