Skip to content
Browse files

Clean up the missing modules error message, so it reports the actual

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...
1 parent 1e9e5bb commit b4294c7d7e71fc487e87ea94f218dab7fe2482f2 @rcaputo committed May 14, 2004
Showing with 5 additions and 8 deletions.
  1. +3 −3 Server/Web.pm
  2. +2 −5 pastebot.perl
View
6 Server/Web.pm
@@ -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);
View
7 pastebot.perl
@@ -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
@@ -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.
Something went wrong with that request. Please try again.