zaproxy / zaproxy/zaproxy

Issue with Token generator

Open
#2,116 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

add-on bug
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.

image

Here is the flow of authentication.

  1. Username and password is sent in POST request to the server.
  2. 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,
image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.