diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-12-28 10:40:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-12-28 10:40:17 +0000 |
commit | 5c0cd3c03f956412c0b0e859d31a1ffe265ef1a1 (patch) | |
tree | d02f1b5f8a62f30b5211b5ef3fc9fb7e4968143c /scripts | |
parent | 51829984d1cef8942bb455de3ed7a2e97f74bf68 (diff) | |
download | brdo-5c0cd3c03f956412c0b0e859d31a1ffe265ef1a1.tar.gz brdo-5c0cd3c03f956412c0b0e859d31a1ffe265ef1a1.tar.bz2 |
- Some fixes to the code-style.sh script.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/code-style.pl | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/code-style.pl b/scripts/code-style.pl index 5418941f9..a5d0103cf 100644 --- a/scripts/code-style.pl +++ b/scripts/code-style.pl @@ -69,14 +69,11 @@ while (<>) { elsif (/<br>/i) { $msg = "'<br>' -> '<br />'"; } - elsif (/HTTP_REFERER/i) { - $msg = "the use of HTTP_REFERER is prone to XSS exploits; use referer_uri() instead"; + elsif (/\$REQUEST_URI/i) { + $msg = "the use of REQUEST_URI is prone to XSS exploits and does not work on IIS; use request_uri() instead"; } - elsif (/QUERY_STRING/i) { - $msg = "the use of HTTP_REFERER is prone to XSS exploits; use referer_uri() instead"; - } - elsif (/REQUEST_URI/i) { - $msg = "the use of HTTP_REFERER is prone to XSS exploits and does not work on IIS; use request_uri() instead"; + elsif (/\"REQUEST_URI\"/i) { + $msg = "the use of REQUEST_URI is prone to XSS exploits and does not work on IIS; use request_uri() instead"; } # XHTML compatibility mode suggests a blank before / @@ -107,9 +104,9 @@ while (<>) { if (/(^|[^a-zA-Z])(if|else|elseif|while|foreach|switch|return|for)\(/) { $msg = "'(' -> ' ('"; } - elsif (/[^;{}:\s\n]\s*\n*$/ && $program && !/^[\s}]*(if|else)/) { - $msg = "don't split lines"; - } + #elsif (/[^;{}:\s\n]\s*\n*$/ && $program && !/^[\s}]*(if|else)/) { + # $msg = "don't split lines"; + #} elsif (/\}\s*else/) { $msg = "'} else' -> '}\\nelse'"; } |