Skip to content

Commit c76c022

Browse files
committed
Land rapid7#3110, Set-Cookie check for msftidy
2 parents 506c354 + c023cb2 commit c76c022

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/msftidy.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@ def check_lines
465465
if ln =~ /(?<!\.)datastore\[["'][^"']+["']\]\s*=(?![=~>])/
466466
error("datastore is modified in code: #{ln}", idx)
467467
end
468+
469+
# do not read Set-Cookie header
470+
if ln =~ /\[['"]Set-Cookie['"]\]/i
471+
warn("Do not read Set-Cookie header directly, use res.get_cookies instead: #{ln}", idx)
472+
end
468473
}
469474
end
470475

0 commit comments

Comments
 (0)