Nasty has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/333170 )
Change subject: NSFileRepo: deliver images without a file repository e.g. Math extension ...................................................................... NSFileRepo: deliver images without a file repository e.g. Math extension Fixed issue from ERM5234 Needs merge to master Change-Id: Ia6e0ed77cb9c0db6ab0e79252e2d1c190c045293 --- M nsfr_img_auth.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NSFileRepo refs/changes/70/333170/1 diff --git a/nsfr_img_auth.php b/nsfr_img_auth.php index 3ee839e..de9725c 100644 --- a/nsfr_img_auth.php +++ b/nsfr_img_auth.php @@ -154,8 +154,12 @@ if ( !$file->exists() || $file->isDeleted( File::DELETED_FILE ) ) { $file = wfFindFile( $name ); //Give other repos a chance to handle this if( !$file || !$file->exists() || $file->isDeleted( File::DELETED_FILE ) ) { - wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $filename ); - return; + + global $wgUploadDirectory; + if( !file_exists( $wgUploadDirectory.$path ) ) { + wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $filename ); + return; + } } } } -- To view, visit https://gerrit.wikimedia.org/r/333170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6e0ed77cb9c0db6ab0e79252e2d1c190c045293 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NSFileRepo Gerrit-Branch: REL1_27 Gerrit-Owner: Nasty <kon...@hallowelt.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits