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

fix: sort CSP directives to have deterministic results - necessary specifically when asserting header values #94

Closed

Conversation

DeepDiver1975
Copy link

@DeepDiver1975 DeepDiver1975 commented Apr 24, 2024

No description provided.

@DeepDiver1975 DeepDiver1975 changed the title fix: sort CSP directives to have deterministic results - necessary sp… fix: sort CSP directives to have deterministic results - necessary specifically when asserting header values Apr 24, 2024
@unrolled unrolled closed this Jun 21, 2024
@DeepDiver1975
Copy link
Author

Mind leaving a comment why this change is not accepted?

@unrolled
Copy link
Owner

It was unclear why this change was needed. Was the goal to have the directives sorted, or to have a more explicit test?

@DeepDiver1975
Copy link
Author

The goal is to have the directives sorted. The test was added to proof that.

Without sorting the directives the result is not deterministic and asserting header values in tests is quite hard in such a setup.

THX

@unrolled
Copy link
Owner

Ahhh I just checked the spec and see what you mean. I'll get the change in right away. In the future a PR description would be helpful in providing context as to why the change is needed. Thanks!

@DeepDiver1975
Copy link
Author

Nice. I was not aware of the spec with respect to the sort order.
My intention was to have testable results.

In any case we got it sorted 🤣

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

Successfully merging this pull request may close these issues.

2 participants