bdemers commented on a change in pull request #317:
URL: https://github.com/apache/shiro/pull/317#discussion_r688028609
##########
File path:
web/src/main/java/org/apache/shiro/web/session/mgt/DefaultWebSessionManager.java
##########
@@ -130,13 +130,18 @@ private Serializable
getReferencedSessionId(ServletRequest request, ServletRespo
//try the URI path segment parameters first:
id = getUriPathSegmentParamValue(request,
ShiroHttpSession.DEFAULT_SESSION_ID_NAME);
- if (id == null) {
+ if (id == null && request instanceof HttpServletRequest) {
//not a URI path segment parameter, try the query parameters:
String name = getSessionIdName();
- id = request.getParameter(name);
- if (id == null) {
- //try lowercase:
- id = request.getParameter(name.toLowerCase());
+ HttpServletRequest httpServletRequest =
WebUtils.toHttp(request);
+ String queryString = httpServletRequest.getQueryString();
+ if (queryString.contains(name)
Review comment:
check for an NPE ;)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]