summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2022-04-13 12:50:49 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-04-19 09:42:25 +0000
commitbce397cccde46497c482a5118528e1044757be27 (patch)
treebeb4e6662bd1ed4a8ed35adcbe827b68fe82a400 /catalog-be
parentfc2bd161cb694f426d0f02e8b322870177036f7f (diff)
Fix encoding/decoding issue
Change-Id: If7a770548702cb9e6bb2d9e866c99c0396f74ee4 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3967 (cherry picked from commit eb8de3664309f577362df7710d6cd93d00a734e2)
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java
index 2e96b0b77e..75809119f0 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/UserAdminServlet.java
@@ -30,8 +30,6 @@ import io.swagger.v3.oas.annotations.servers.Server;
import io.swagger.v3.oas.annotations.servers.Servers;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.tags.Tags;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
@@ -66,7 +64,6 @@ import org.springframework.stereotype.Controller;
@Controller
public class UserAdminServlet extends BeGenericServlet {
- private static final String UTF_8 = "UTF-8";
private static final String ROLE_DELIMITER = ",";
private static final Logger log = Logger.getLogger(UserAdminServlet.class);
private final UserBusinessLogic userBusinessLogic;
@@ -160,12 +157,7 @@ public class UserAdminServlet extends BeGenericServlet {
@ApiResponse(responseCode = "500", description = "Internal Server Error")})
@PermissionAllowed(AafPermission.PermNames.INTERNAL_ALL_VALUE)
public User authorize(@HeaderParam(value = Constants.USER_ID_HEADER) String userId, @HeaderParam("HTTP_CSP_FIRSTNAME") String firstName,
- @HeaderParam("HTTP_CSP_LASTNAME") String lastName, @HeaderParam("HTTP_CSP_EMAIL") String email)
- throws UnsupportedEncodingException {
- userId = userId != null ? URLDecoder.decode(userId, UTF_8) : null;
- firstName = firstName != null ? URLDecoder.decode(firstName, UTF_8) : null;
- lastName = lastName != null ? URLDecoder.decode(lastName, UTF_8) : null;
- email = email != null ? URLDecoder.decode(email, UTF_8) : null;
+ @HeaderParam("HTTP_CSP_LASTNAME") String lastName, @HeaderParam("HTTP_CSP_EMAIL") String email) {
User authUser = new User();
authUser.setUserId(userId);
authUser.setFirstName(firstName);