summaryrefslogtreecommitdiff
path: root/rt/bin/mason_handler.svc.in
diff options
context:
space:
mode:
Diffstat (limited to 'rt/bin/mason_handler.svc.in')
-rw-r--r--rt/bin/mason_handler.svc.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/rt/bin/mason_handler.svc.in b/rt/bin/mason_handler.svc.in
index 2cbf4357a..119b110db 100644
--- a/rt/bin/mason_handler.svc.in
+++ b/rt/bin/mason_handler.svc.in
@@ -234,6 +234,17 @@ $Handler ||= RT::Interface::Web::Handler->new(
while( my $cgi = CGI::Fast->new ) {
my $comp = $ENV{'PATH_INFO'};
+ # 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";
+
+ RT::Interface::Web::Handler->CleanupRequest();
+
+ next;
+ }
+
$comp = $1 if ($comp =~ /^(.*)$/);
my $web_path = RT->Config->Get('WebPath');
$comp =~ s|^\Q$web_path\E\b||i;