Added a check for Set-Cookie header in msftidy

bug/bundler_fix
FireFart 2014-03-01 13:30:24 +01:00
parent 506c354722
commit 551327bec6
1 changed files with 5 additions and 0 deletions

View File

@ -465,6 +465,11 @@ class Msftidy
if ln =~ /(?<!\.)datastore\[["'][^"']+["']\]\s*=(?![=~>])/
error("datastore is modified in code: #{ln}", idx)
end
# do not read Set-Cookie header
if ln =~ /\[['"]Set-Cookie['"]\]/
warn("Do not read Set-Cookie header directly, use res.get_cookies instead: #{ln}", idx)
end
}
end