Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@kiy0taka
Copy link

@kiy0taka kiy0taka commented Apr 8, 2022

With structural parameter page and following POST requests:

POST https://www.example.com/app/aaa page=p1&ddd=eee
POST https://www.example.com/app/aaa page=p2&ddd=fff

Parameter names are used for nodes, so different values are combined into one node.
image

Fixed so that parameter values are used for different nodes.
image

kiy0taka added 2 commits April 8, 2022 10:22
Signed-off-by: kiy0taka <kiy0taka333@gmail.com>
Signed-off-by: kiy0taka <kiy0taka333@gmail.com>
@kiy0taka kiy0taka force-pushed the fix/post-structural-parameters branch from b2ad2e1 to 122cfdb Compare April 8, 2022 01:22
@psiinon
Copy link
Member

psiinon commented Apr 19, 2022

Thanks - will review this asap...

@kingthorin
Copy link
Member

* What went wrong:
Execution failed for task ':zap:spotlessJavaCheck'.
> The following files had format violations:
      zap/src/test/java/org/zaproxy/zap/model/StandardParameterParserUnitTest.java
          @@ -19,6 +19,7 @@
           ·*/
           package·org.zaproxy.zap.model;
           
          +import·static·java.util.Arrays.asList;
           import·static·org.hamcrest.MatcherAssert.assertThat;
           import·static·org.hamcrest.Matchers.empty;
           import·static·org.hamcrest.Matchers.equalTo;
          @@ -26,7 +27,6 @@
           import·static·org.hamcrest.Matchers.is;
           import·static·org.hamcrest.Matchers.nullValue;
           import·static·org.junit.jupiter.api.Assertions.assertEquals;
          -import·static·java.util.Arrays.asList;
           
           import·java.util.ArrayList;
           import·java.util.List;
  Run './gradlew :zap:spotlessApply' to fix these violations.

Signed-off-by: kiy0taka <kiy0taka333@gmail.com>
@kingthorin
Copy link
Member

Thanks @kiy0taka

@psiinon psiinon requested a review from thc202 April 20, 2022 13:26
}

@Test
void defaultTreePath() throws HttpMalformedHeaderException, URIException {
Copy link
Member

Choose a reason for hiding this comment

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

Better use parameterized tests.

Copy link
Member

Choose a reason for hiding this comment

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

Also be good to add one that has both query and form parameters.

Copy link
Author

Choose a reason for hiding this comment

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

Added test cases using ParameterizedTest.

@kiy0taka kiy0taka force-pushed the fix/post-structural-parameters branch from 842b7c5 to c3f7af2 Compare April 21, 2022 04:22
Signed-off-by: kiy0taka <kiy0taka333@gmail.com>
Signed-off-by: kiy0taka <kiy0taka333@gmail.com>
@kiy0taka kiy0taka force-pushed the fix/post-structural-parameters branch from c3f7af2 to 15de3b7 Compare April 21, 2022 04:29
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.