Permalink
Browse files

MDL-34585 fix broken blog file access control

  • Loading branch information...
1 parent 02814bf commit 3a933cdf101226f5ea5bd90d1567535ee23828dc @skodak skodak committed Jul 31, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/filelib.php
View
@@ -3471,15 +3471,15 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
}
}
- if ('publishstate' === 'public') {
+ if ($entry->publishstate === 'public') {
if ($CFG->forcelogin) {
require_login();
}
- } else if ('publishstate' === 'site') {
+ } else if ($entry->publishstate === 'site') {
require_login();
//ok
- } else if ('publishstate' === 'draft') {
+ } else if ($entry->publishstate === 'draft') {
require_login();
if ($USER->id != $entry->userid) {
send_file_not_found();

0 comments on commit 3a933cd

Please sign in to comment.