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

Python: Model CookieWrites from HeaderWrites #16696

Merged
merged 12 commits into from
Jul 11, 2024

Conversation

joefarebrother
Copy link
Contributor

Part of https://github.com/github/codeql-python-team/issues/792 promoting #6360; as well as a follow-up to #16105

This PR defines new instances of the CookieWrite concept in terms of the HeaderWrite concept; as is done in experimental with the Cookie concept.

@github-actions github-actions bot added the Python label Jun 6, 2024
@joefarebrother joefarebrother marked this pull request as ready for review June 24, 2024 21:21
@joefarebrother joefarebrother requested a review from a team as a code owner June 24, 2024 21:21
@joefarebrother joefarebrother changed the title [Draft] Python: Model CookieWrites from HeaderWrites Python: Model CookieWrites from HeaderWrites Jun 24, 2024
Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only two things I wanted to point out was fixed later on, so LGTM 👍

{
CookieHeaderWrite() {
exists(StringLiteral str |
str.getText() = "Set-Cookie" and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be case sensitive? I see this was fixed later

Comment on lines 1249 to 1251
override DataFlow::Node getNameArg() {
result = this.(Http::Server::ResponseHeaderWrite).getValueArg()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When getHeaderArg is implemented, I would expect both name+value to be none(). I see this was fixed later.

@joefarebrother joefarebrother merged commit 8152ec7 into github:main Jul 11, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants