Skip to content

Commit fb78fb2

Browse files
Pearl1594Pearl Dsilva
andauthored
fix login issue post upgrade (#4465)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
1 parent 45f7b33 commit fb78fb2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAMLUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public static void setupSamlUserCookies(final LoginCmdResponse loginResponse, fi
280280
resp.addCookie(new Cookie("timezone", URLEncoder.encode(timezone, HttpUtils.UTF_8)));
281281
}
282282
resp.addCookie(new Cookie("userfullname", URLEncoder.encode(loginResponse.getFirstName() + " " + loginResponse.getLastName(), HttpUtils.UTF_8).replace("+", "%20")));
283-
resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly;Path=/", ApiConstants.SESSIONKEY, loginResponse.getSessionKey()));
283+
resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly", ApiConstants.SESSIONKEY, loginResponse.getSessionKey()));
284284
}
285285

286286
/**

server/src/main/java/com/cloud/api/ApiServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void processRequestInContext(final HttpServletRequest req, final HttpServletResp
218218
try {
219219
responseString = apiAuthenticator.authenticate(command, params, session, remoteAddress, responseType, auditTrailSb, req, resp);
220220
if (session != null && session.getAttribute(ApiConstants.SESSIONKEY) != null) {
221-
resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly;Path=/", ApiConstants.SESSIONKEY, session.getAttribute(ApiConstants.SESSIONKEY)));
221+
resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly", ApiConstants.SESSIONKEY, session.getAttribute(ApiConstants.SESSIONKEY)));
222222
}
223223
} catch (ServerApiException e) {
224224
httpResponseCode = e.getErrorCode().getHttpCode();

0 commit comments

Comments
 (0)