Skip to content
Browse files

MDL-34585 fix broken blog file access control

  • Loading branch information...
1 parent f2ddce9 commit bfa9be6230de5132e2f6e5e7d3f9a5a9f7b57125 @skodak skodak committed Jul 31, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/filelib.php
View
6 lib/filelib.php
@@ -3263,15 +3263,15 @@ function file_pluginfile($relativepath, $forcedownload) {
}
}
- 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 bfa9be6

Please sign in to comment.
Something went wrong with that request. Please try again.