diff options
Diffstat (limited to 'LedgerSMB.pm')
-rwxr-xr-x | LedgerSMB.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm index ab771eb1..4fe53d2e 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -103,10 +103,9 @@ sub escape { my $regex = qr/([^a-zA-Z0-9_.-])/; $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge; - # for Apache 2 we escape strings twice - if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/)) { - $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge - if $1 == 0 && $2 < 44; + # for Apache 2.0.x prior to 2.0.44 we escape strings twic; + if ($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.0\.(\d+)/ && $1 < 44) { + $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge; } $str; } |