Skip to content

Commit

Permalink
Clean up the missing modules error message, so it reports the actual
Browse files Browse the repository at this point in the history
missing module rather than the ones it thinks it needs.

Plug a security leak.  You are advised to upgrade to at least this
version NOW.
  • Loading branch information
rcaputo committed May 14, 2004
1 parent 1e9e5bb commit b4294c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Server/Web.pm
Expand Up @@ -139,10 +139,10 @@ sub httpd_session_got_query {
### Fetch some kind of data.

if ($url =~ m{^/(data/.+?)\s*$}) {
# TODO - Better path support.
# TODO - Better path support?
my $filename = $1;
$filename =~ s/\.\.\/\///g;
$filename =~ s/\/+/\//g;
$filename =~ s{/\.+}{/}g; # Remove ., .., ..., etc.
$filename =~ s{/+}{/}g; # Combine // into /

my ($code, $type, $content);

Expand Down
7 changes: 2 additions & 5 deletions pastebot.perl
Expand Up @@ -38,9 +38,7 @@
sub Error ($ $) {
my ($lib, $msg) = @_;

if ( $msg =~ "\@INC" ) {
$msg = $lib;
}
$msg =~ s/ in \@INC.*//s;

my $liberr = << "EOF";
$0 Error while loading $lib: $msg
Expand All @@ -66,11 +64,10 @@ ()
for my $lib ( @LIBS ) {
eval "use $lib;" ;

$@ and Error $lib, $@;
$@ and Error($lib, $@);
}
}


LoadLibraries();
POE::Kernel->run();
exit 0;

0 comments on commit b4294c7

Please sign in to comment.