Re: Disallow path info

2015-03-23 Thread Randolf Richardson
Hello, I would like to disallow path info, i.e., respond with 404 if PATH_INFO is not empty, i.e., if the URL is something like http://mysite.example.com/myscript.pl/path/info. I tried the Apache directive AcceptPathInfo Off, but sadly this only works with the normal cgi handler; ModPerl

Re: Disallow path info

2015-03-23 Thread Phillip Hellewell
On Mon, Mar 23, 2015 at 3:08 PM, Randolf Richardson rand...@modperl.pl wrote: Can you provide some additional detail about what you're doing? I'm just trying to secure my website, and one problem right now is if someone enters http://mysite.example.com/myscript.pl/path/info , not only

Re: Disallow path info

2015-03-23 Thread Lathan Bidwell
Out of curiosity, Are there links that actually point to / myscript.pl/path/info/... ? Because if you are trying to block them, then it sounds like you don't want to link to them either. Would it be possible to find how they are reaching that page and change the links? Another perspective: If

Re: Disallow path info

2015-03-23 Thread Phillip Hellewell
Good news. I got a helpful tip from a Dr James Smith to use a PerlFixupHandler that looks like this: package My::Fixup; use strict; use warnings; use utf8; use Apache2::Const qw(OK NOT_FOUND); sub handler { my $r = shift; return NOT_FOUND if $r-path_info; return OK; } 1; It worked

Re: Disallow path info

2015-03-23 Thread Phillip Hellewell
On Mon, Mar 23, 2015 at 8:05 PM, Lathan Bidwell lat...@andrews.edu wrote: Out of curiosity, Are there links that actually point to /myscript.pl/path/info/... ? Nope, it was just something I accidentally stumbled onto while testing my site; so there's no concern about breaking any links.