diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-10 14:12:58 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-08-01 13:56:12 +0200 |
commit | 7a62fbd205874355abb3b551b182bc61b9c3d3e1 (patch) | |
tree | 8fba151653401d4af74f2091fb7d2e6add45f00e /apps/files_external/ajax | |
parent | e30287cf814bca99b01561df0e60fb00c59ade42 (diff) | |
download | nextcloud-server-7a62fbd205874355abb3b551b182bc61b9c3d3e1.tar.gz nextcloud-server-7a62fbd205874355abb3b551b182bc61b9c3d3e1.zip |
Fix comparisons in the files external app
Signed-off-by: Joas Schilling <coding@schilljs.com>
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( |