diff options
Diffstat (limited to 'settings/ajax/enableapp.php')
-rw-r--r-- | settings/ajax/enableapp.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php index cf1b7f29db5..b6d62671a63 100644 --- a/settings/ajax/enableapp.php +++ b/settings/ajax/enableapp.php @@ -28,6 +28,13 @@ OC_JSON::checkAdminUser(); OCP\JSON::callCheck(); +$lastConfirm = (int) \OC::$server->getSession()->get('last-password-confirm'); +if ($lastConfirm < (time() - 30 * 60 + 15)) { // allow 15 seconds delay + $l = \OC::$server->getL10N('core'); + OC_JSON::error(array( 'data' => array( 'message' => $l->t('Password confirmation is required')))); + exit(); +} + $groups = isset($_POST['groups']) ? (array)$_POST['groups'] : null; try { |