summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Interface/Web/Standalone.pm
diff options
context:
space:
mode:
authorivan <ivan>2011-04-18 23:15:19 +0000
committerivan <ivan>2011-04-18 23:15:19 +0000
commit75162bb14b3e38d66617077843f4dfdcaf09d5c4 (patch)
treed89dd49a476cf2f0859ed6a0adc2992ea6d69d04 /rt/lib/RT/Interface/Web/Standalone.pm
parentfc6209f398899f0211cfcedeb81a3cd65e04a941 (diff)
import rt 3.8.10
Diffstat (limited to 'rt/lib/RT/Interface/Web/Standalone.pm')
-rwxr-xr-xrt/lib/RT/Interface/Web/Standalone.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/rt/lib/RT/Interface/Web/Standalone.pm b/rt/lib/RT/Interface/Web/Standalone.pm
index 91dbac33b..3157e315e 100755
--- a/rt/lib/RT/Interface/Web/Standalone.pm
+++ b/rt/lib/RT/Interface/Web/Standalone.pm
@@ -77,6 +77,15 @@ sub handle_request {
Module::Refresh->refresh if RT->Config->Get('DevelMode');
RT::ConnectToDatabase() unless RT->InstallMode;
+
+ # Each environment has its own way of handling .. and so on in paths,
+ # so RT consistently forbids such paths.
+ if ( $cgi->path_info =~ m{/\.} ) {
+ $RT::Logger->crit("Invalid request for ".$cgi->path_info." aborting");
+ print STDOUT "HTTP/1.0 400\r\n\r\n";
+ return RT::Interface::Web::Handler->CleanupRequest();
+ }
+
$self->SUPER::handle_request($cgi);
$RT::Logger->crit($@) if $@ && $RT::Logger;
warn $@ if $@ && !$RT::Logger;