Skip to content

verification issue found with 'not' substring match #330

@lzx404243

Description

@lzx404243

Noticed with Proxy Verifier version 2.12.0, with a - [fieldname, { value: [substr_to_match], not: contains }] directive, proxy verifier would fails verification whenever substr_to_match is longer than the value of fieldname. An example to demonstrate this:

      - client-request:
          ............
          headers:
            fields:
              # value is 7 bytes long.
              - [Cookie, "foo=bar"]

The following verification would fail:

        proxy-request:
          headers:
            fields:
              - [Cookie, { value: [12345678], not: contains }]

[INFO]: Not Contains Violation: Key: "demo", Field Name: "cookie", Required Values: "12345678", Received Values: "foo=bar"

while the following verification would pass:

  proxy-request:
          headers:
            fields:
              - [Cookie, { value: [1234567], not: contains }]

[INFO]: Not Contains Success: Not Found. Key: "invalid-acookie-not-sent-to-downstream-in-exempt-case", Field Name: "cookie", Required Values: "1234567", Received Values: "foo=bar"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions