-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
paramdigger: Handle session change & previous PR follow-up #5306
Conversation
addOns/paramdigger/src/main/java/org/zaproxy/addon/paramdigger/ExtensionParamDigger.java
Outdated
Show resolved
Hide resolved
httpSender.sendAndReceive(msg); | ||
addCacheMessage(msg); | ||
indicValue = msg.getResponseHeader().getHeader(cache.getIndicator()); | ||
return this.checkCacheHit(indicValue, cache); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was returning false when true, should have test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will review, and see what I can do/add. I did double check that existing tests passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed the logic was the other way around. However, I can't come up with a test case where it matters 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean based on the existing tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, shouldNotFindCacheWithAnyCacheBuster
seems to hit one case (always miss true). But, really passes whether or not that block is true or false 🤷♂️
You can validate simply with the following in CacheController
around L870:
System.out.println("Here");
return false;//!this.checkCacheHit(indicValue, cache);
and
System.out.println("Here");
return true;//!this.checkCacheHit(indicValue, cache);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to check the code/tests.
cb1b866
to
230711e
Compare
2f0010d
to
f448f25
Compare
- CHANGELOG > Add change note. - CacheController > Remove unnecessary else block and conditional handling. - ExtensionParamDigger > Add and use SessionChangedListener. - HeaderGuesser > Make constant final. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
Thank you! |
Overview
Related Issues
Checklist
./gradlew spotlessApply
for code formatting