summaryrefslogtreecommitdiff
path: root/rt/bin/mason_handler.scgi
diff options
context:
space:
mode:
authorivan <ivan>2011-04-19 00:23:57 +0000
committerivan <ivan>2011-04-19 00:23:57 +0000
commit71449abb58df547f3c872cd64af733e6d3fa7f81 (patch)
tree03c452d9d68db46f43a0833fcd64a209b320b988 /rt/bin/mason_handler.scgi
parent96d552cc782670bfd48b7e6a81ffe3515dffd3e6 (diff)
landing 3.8.10 on 2.1 branch
Diffstat (limited to 'rt/bin/mason_handler.scgi')
-rwxr-xr-xrt/bin/mason_handler.scgi12
1 files changed, 12 insertions, 0 deletions
diff --git a/rt/bin/mason_handler.scgi b/rt/bin/mason_handler.scgi
index 5cbb9a30f..83649edaf 100755
--- a/rt/bin/mason_handler.scgi
+++ b/rt/bin/mason_handler.scgi
@@ -57,6 +57,18 @@ require (dirname(__FILE__) . '/webmux.pl');
require CGI;
my $cgi = CGI->new;
+
+# 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();
+
+ return 0;
+}
+
if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
&& ( $Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
$cgi->path_info( $cgi->path_info . "/index.html" );