From 5c0cd3c03f956412c0b0e859d31a1ffe265ef1a1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 28 Dec 2003 10:40:17 +0000 Subject: - Some fixes to the code-style.sh script. --- scripts/code-style.pl | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'scripts') 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 (/
/i) { $msg = "'
' -> '
'"; } - 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'"; } -- cgit v1.2.3