Skip to content

Commit

Permalink
Item11325: Issues with cmd= on edit
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@13291 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Dec 3, 2011
1 parent 91ffef6 commit 8af27c0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/lib/Foswiki/UI/Edit.pm
Expand Up @@ -344,6 +344,26 @@ sub init_edit {

if ($adminCmd) {

unless ($users->isAdmin($user)) {
throw Foswiki::OopsException(
'accessdenied',
def => 'topic_access',
web => $web,
topic => $topic,
params => [ "'cmd=$adminCmd'", 'Administrators only' ]
);
}

unless ($adminCmd =~ m/^(rep|del)Rev$/ ) {
throw Foswiki::OopsException(
'attention',
def => 'unrecognized_action',
web => $web,
topic => $topic,
params => [ "'cmd=$adminCmd'" ]
);
}

# An admin cmd is a command such as 'repRev' or 'delRev'.
# These commands can used by admins to silently remove
# revisions from topics histories from some stores. repRev
Expand Down

0 comments on commit 8af27c0

Please sign in to comment.