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

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

Open
djcarlin opened this issue Feb 23, 2022 · 0 comments
Open

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

djcarlin opened this issue Feb 23, 2022 · 0 comments

Comments

@djcarlin
Copy link

djcarlin commented Feb 23, 2022

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>: "*"
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

1 participant