Issue with Token generator
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 15.8k
- Forks
- 2.6k
- Avg merge
- 13h 16m
- Merged PRs (30d)
- 17
Description
Hi All,
Token generator is not working below is how I initiated the extension. There were two JSESSION IDs displayed I tried with both.

Here is the flow of authentication.
- Username and password is sent in POST request to the server.
- Servers sends a redirects to the index page ("302" request), sets the cookie using "Set-Cookie:"
I notice that ZAP doesn't find the session token,

I get the below error message from the logs
2015-12-10 14:17:06,301 [Thread-328] ERROR ZAP$UncaughtExceptionLogger - Exception in thread "Thread-328" java.lang.ArithmeticException: / by zero at org.zaproxy.zap.extension.tokengen.CharacterFrequencyMap.checkCharacterUniformity(CharacterFrequencyMap.java:134) at org.zaproxy.zap.extension.tokengen.TokenAnalyserThread.run(TokenAnalyserThread.java:97)
Regards,
Satheesh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CharacterFrequencyMap.checkCharacterUniformity and TokenAnalyserThread.run, where the reported ArithmeticException occurs. Reproduce the token-generator flow using the JSESSION IDs from the authentication response, then verify that token analysis completes without the divide-by-zero failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100