[Jifty-commit] r1499 - in jifty/trunk: lib/Jifty/View/Static

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Jul 7 00:37:33 EDT 2006


Author: jesse
Date: Fri Jul  7 00:37:33 2006
New Revision: 1499

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/View/Static/Handler.pm

Log:
 r13595 at pinglin:  jesse | 2006-07-06 20:33:09 -0400
 * Fix the fix. (We were overly restrictive)
 


Modified: jifty/trunk/lib/Jifty/View/Static/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Static/Handler.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Static/Handler.pm	Fri Jul  7 00:37:33 2006
@@ -120,7 +120,8 @@
         my $abspath = Jifty::Util->absolute_path( $path . "/" . $file );
         # If the user is trying to request something outside our static root, 
         # decline the request
-        unless ($abspath =~ /^\Q$path\E/) {
+        my $abs_base_path = Jifty::Util->absolute_path( $path );
+        unless ($abspath =~ /^\Q$abs_base_path\E/) {
             return undef;
         }
         return $abspath if ( -f $abspath && -r $abspath );


More information about the Jifty-commit mailing list