Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unexpected session creation #1078

Closed
yanchevsky opened this issue Feb 26, 2021 · 4 comments · Fixed by #1096
Closed

Prevent unexpected session creation #1078

yanchevsky opened this issue Feb 26, 2021 · 4 comments · Fixed by #1096

Comments

@yanchevsky
Copy link
Contributor

Every time a session is accessed, a session is created automatically. This is incorrect behavior if data placement into session is not used.
Problematic place:


public class SessionFacade implements Map {
...
    public Object get(String name) {
        return RequestContext.getHttpRequest().getSession(true).getAttribute(name);
    }

...
}
@ipolevoy
Copy link
Member

ipolevoy commented Apr 6, 2021

@yanchevsky you can push the code here, now that branches settled

@yanchevsky yanchevsky changed the title Disable unexpected session creation Prevent unexpected session creation Apr 13, 2021
@yanchevsky yanchevsky linked a pull request Apr 13, 2021 that will close this issue
ipolevoy added a commit that referenced this issue May 18, 2021
#1078 - Prevent unexpected session creation
@yanchevsky yanchevsky reopened this May 19, 2021
@yanchevsky
Copy link
Contributor Author

NullPointerException when we use session in SpecHelper (RequestContext was created without HttpServletRequest).

yanchevsky pushed a commit that referenced this issue May 19, 2021
ipolevoy added a commit that referenced this issue May 19, 2021
#1078 - Prevent unexpected session creation - add HttpServletRequest …
@ipolevoy
Copy link
Member

@yanchevsky is this completed?

@yanchevsky
Copy link
Contributor Author

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants