Skip to content

Commit 551327b

Browse files
committed
Added a check for Set-Cookie header in msftidy
1 parent 506c354 commit 551327b

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['"]\]/
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)