Skip to content

v4.3.0 | In memory Token saving with no clean up leading to High Heap utilization and thus crashing JVM #350

@Shishir53

Description

@Shishir53

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run CSRF Test application.
  2. visit one unprotected page. It generates one token.
  3. Make a call to invalidate session on home page.
  4. It leads to OnSessionDestroyed() call via listener and then via filter it goes to handlesession() via csrfguardfilter. Here the session key which was used to remove the token is used again by handlesession and one new token is generated with this session key. This token is not being used further, but if this scenario is tested under heavy load, such unused tokens are generated and thus object size of concurrentHashmap grows up and sunbesequently crashing out JVm with error 'out of Memory'.

Expected behavior
No unused extra token to be generated.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
This is happening irrespective of being hosted in tomcat or websphere.

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions