diff options
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r-- | apps/files_external/ajax/oauth2.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/ajax/oauth2.php b/apps/files_external/ajax/oauth2.php index db2570800af..8b257b77ef6 100644 --- a/apps/files_external/ajax/oauth2.php +++ b/apps/files_external/ajax/oauth2.php @@ -46,8 +46,8 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST $client->setApprovalPrompt('force'); $client->setAccessType('offline'); if (isset($_POST['step'])) { - $step = $_POST['step']; - if ($step == 1) { + $step = (int) $_POST['step']; + if ($step === 1) { try { $authUrl = $client->createAuthUrl(); OCP\JSON::success(array('data' => array( @@ -58,7 +58,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST 'message' => $l->t('Step 1 failed. Exception: %s', array($exception->getMessage())) ))); } - } else if ($step == 2 && isset($_POST['code'])) { + } else if ($step === 2 && isset($_POST['code'])) { try { $token = $client->authenticate((string)$_POST['code']); OCP\JSON::success(array('data' => array( |