X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fbin%2Fmason_handler.scgi;h=83649edaffba96dec1b150fd79abde5bbd33a561;hb=c3da5cf1caa244937d280e0f406927103beef148;hp=5cbb9a30faa372198883ffe00b2782faaae85d71;hpb=01352af8e44b7eb70b2b587ca43ab7ca946f038d;p=freeside.git 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" );