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

Implement a passive check for cookies without SameSite set #471

Merged
merged 1 commit into from Jul 27, 2016
Merged

Implement a passive check for cookies without SameSite set #471

merged 1 commit into from Jul 27, 2016

Conversation

psiinon
Copy link
Member

@psiinon psiinon commented Jul 27, 2016

Fixes zaproxy/zaproxy#2716 Implement a passive check for cookies without SameSite set

@psiinon
Copy link
Member Author

psiinon commented Jul 27, 2016

Repushed with fix and unit tests

Pattern pattern = Pattern.compile("Set-Cookie.*" + name, Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(msg.getResponseHeader().toString());
if (matcher.find()) {
evidence = matcher.group();
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't there be multiple matches at this point? So perhaps you want group(1)?

Copy link
Member Author

Choose a reason for hiding this comment

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

It should just return the next match, ie the same as group(1), shouldnt it?

@psiinon
Copy link
Member Author

psiinon commented Jul 27, 2016

Hopefully fixed all of those comments

@thc202
Copy link
Member

thc202 commented Jul 27, 2016

Looks good to me.

@kingthorin kingthorin merged commit f556af7 into zaproxy:alpha Jul 27, 2016
@kingthorin
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants