yahoo / yahoo/proxy-verifier

Duplicate field verification improvement

Open
#83 0 comments 0 reactions 1 assignee View on GitHub

@bneradt is already working on this.

Since Jan 12, 2021.

Dominant language
C++
Stars
47
Forks
29
Avg merge
5d 6h
Merged PRs (30d)
3

Description

We currently support duplicate field verification via this syntax:

https://github.com/SolidWallOfCode/txn_box/blob/ac14d6ba457df564738fea1566fb68b7745d42ce/test/autest/gold_tests/ct_header/ct_header.replay.yaml#L411-L414

        - [ set-cookie,
            [ "A1=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly",
              "A3=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly" ],
            equal ]

This applies the equal directive to each set-cookie duplicated field in the order listed. Only one directive type can be specified. We should at least support the new map syntax for this:

        - [ set-cookie,
            { value: ["A1=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly",
              "A3=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly" ],
            as: equal } ]

And this would be really cool:

        - [ set-cookie,
            [ 
              { value: "A1=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly",
                as: present },
              { value: "A3=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly" ],
                as: equal } ] ]

Thus different directives could be applied to each field. This latter is not likely easy to implement. Look into it.

Regardless of the mechanism settled upon, this must be documented.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.