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

Duplicate field verification improvement #83

Open
bneradt opened this issue Jan 12, 2021 · 0 comments
Open

Duplicate field verification improvement #83

bneradt opened this issue Jan 12, 2021 · 0 comments
Assignees

Comments

@bneradt
Copy link
Collaborator

bneradt commented Jan 12, 2021

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.

@bneradt bneradt self-assigned this Jan 12, 2021
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