Fix bug allowing cache reset without reset permission

The permission check for non-ajax reset request was checking for allow_invalidate rather than the correct allow_reset.
This commit is contained in:
Nate Bessette 2015-05-20 16:51:35 -04:00
parent aa41e5ad97
commit 3b9b50afab

View file

@ -68,7 +68,7 @@ class OpCacheService
echo json_encode($self->getData((empty($_GET['section']) ? null : $_GET['section'])));
}
exit;
} else if (isset($_GET['reset']) && $self->getOption('allow_invalidate')) {
} else if (isset($_GET['reset']) && $self->getOption('allow_reset')) {
$self->resetCache();
} else if (isset($_GET['invalidate']) && $self->getOption('allow_invalidate')) {
$self->resetCache($_GET['invalidate']);