If an object has already been unstubbed (i.e. we have a copy of the StubObject, which...
[lhc/web/wiklou.git] / img_auth.php
index e5d8d88..cd8ec43 100644 (file)
@@ -55,6 +55,10 @@ if( !$title instanceof Title ) {
        wfDebugLog( 'img_auth', "Unable to construct a valid Title from `{$name}`" );
        wfForbidden();
 }
+if( !$title->userCanRead() ) {
+       wfDebugLog( 'img_auth', "User does not have access to read `{$name}`" );
+       wfForbidden();
+}
 $title = $title->getPrefixedText();
 
 // Check the whitelist if needed