Skip to content

ATS crashes when using txn_box and client sends duplicate header.  #73

Description

@djcarlin

This txn_box config checks if HTTP method is not PURGE, and then adds a response header depending on the value of Origin client request header.

The problem I am having is that ATS 9.1 crashes if a misbehaving client sends two Origin headers. The values of the two Origin headers doesn't seem to matter.

Using txn_box 0.4.2

- with: [ua-req-method, ua-req-field<Origin>]
  select:
  - as-tuple:
    - none-of:
      - match<nc>: "purge"
    - any-of:
      - tld: "foo.net"
      - tld: "foo-inc.com"
      - tld: "fooinc.com"
      - tld: "foo.com"
      - tld: "foo.com.nz"
    do:
    - debug: "MATCH: Origin {ua-req-field<Origin>} using method {ua-req-method}"
    - when: proxy-rsp
      do:
      - proxy-rsp-field<Access-Control-Allow-Origin>: ua-req-field<Origin>
  - otherwise:
    do:
    - debug: "NOT MATCH: Origin {ua-req-field<Origin>} using method {ua-req-method}"
    - when: proxy-rsp
      do:
      - proxy-rsp-field<Access-Control-Allow-Origin>: "*"

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions