Skip to content

Commit

Permalink
Even more automation: now blocks_execute_url_action() checks if the user
Browse files Browse the repository at this point in the history
has sufficient rights to execute the action automatically. It's therefore
safe to call without ANY checks being done first.
  • Loading branch information
defacer committed Feb 1, 2005
1 parent 0144a0a commit 3edc57e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blocklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
function blocks_execute_url_action(&$PAGE, &$pageblocks) {
$blockaction = optional_param('blockaction');

if (empty($blockaction) || !confirm_sesskey()) {
if (empty($blockaction) || !$PAGE->user_allowed_editing() || !confirm_sesskey()) {
return;
}

Expand Down

0 comments on commit 3edc57e

Please sign in to comment.