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

paramdigger: Add patches for header guesser errors #4561

Merged

Conversation

ArkaprabhaChakraborty
Copy link
Contributor

Related to: zaproxy/zaproxy#7694

@kingthorin
Copy link
Member

Needs cleanup. Comments and System.out 😉

@thc202 thc202 changed the title Add patches for header guesser errors paramdigger: Add patches for header guesser errors Apr 24, 2023
@thc202
Copy link
Member

thc202 commented Apr 24, 2023

The changelog should be updated.

@ArkaprabhaChakraborty
Copy link
Contributor Author

ArkaprabhaChakraborty commented Apr 25, 2023 via email

@ArkaprabhaChakraborty
Copy link
Contributor Author

ArkaprabhaChakraborty commented Apr 25, 2023 via email

@thc202
Copy link
Member

thc202 commented May 1, 2023

Add TODO comments or tasks in the issue instead.

@ArkaprabhaChakraborty
Copy link
Contributor Author

ArkaprabhaChakraborty commented May 1, 2023 via email

Signed-off-by: ArkaprabhaChakraborty <chakrabortyarkaprabha998@gmail.com>
@ArkaprabhaChakraborty
Copy link
Contributor Author

That should be it! :)

@ArkaprabhaChakraborty
Copy link
Contributor Author

ping @thc202

Copy link
Member

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +254 to +264
switch (method) {
case GET:
headers.setMethod(HttpRequestHeader.GET);
break;
case POST:
headers.setMethod(HttpRequestHeader.POST);
break;
default:
throw new IllegalArgumentException(
"Method " + method + " not supported.");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not need to be in this PR, letting the enum update the request header would reduce duplication and simplify the code.

|| !this.checkCacheHit(indicValue, cache));
if (indicValue == null || indicValue.isEmpty()) {
return true;
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These else statements could be removed.

@@ -74,6 +74,7 @@ public class HeaderGuesser implements Runnable {
private static final String POISON_DEFINITION = "paramdigger.results.poison.definition";
private static final String POISON_DEFINITION_FIRST =
"paramdigger.results.poison.definition.first";
private static List<Integer> ERROR_CODES = List.of(400, 413, 418, 429, 503);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final too.

@ArkaprabhaChakraborty
Copy link
Contributor Author

ArkaprabhaChakraborty commented May 15, 2023 via email

@kingthorin
Copy link
Member

That's what the Output panel is (IMHO)

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

Successfully merging this pull request may close these issues.

3 participants