DB name can have hyphens (fixed in r79767), bug 26685 pointed out the message discrepancy
[lhc/web/wiklou.git] / img_auth.php
index b99773b..c2541f6 100644 (file)
@@ -43,11 +43,12 @@ if( !isset( $_SERVER['PATH_INFO'] ) ) {
        if( !$path ) {
         wfForbidden( 'img-auth-accessdenied', 'img-auth-nopathinfo' );
        }
+       $path = "/$path";
 } else {
        $path = $_SERVER['PATH_INFO'];
 }
 
-$filename = realpath( $wgUploadDirectory . '/' . $path );
+$filename = realpath( $wgUploadDirectory . $path );
 $realUpload = realpath( $wgUploadDirectory );
 
 // Basic directory traversal check