Преглед изворни кода

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.
Nate Bessette пре 10 година
родитељ
комит
3b9b50afab
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      index.php

+ 1 - 1
index.php

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