Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2018-08-08 15:54:03 +0300
committerGitHub <noreply@github.com>2018-08-08 15:54:03 +0300
commita8eb6c77c6d07ef1151db5297d28c3e368ff099a (patch)
tree5d72e0a97922122aeae50ecd50c13f1991f5429f
parent38ea98502e23961b6d1675f7a743ae38ff4cb3dc (diff)
parent219369148e6afa2f0710d9fccda2abc9c20e9630 (diff)
Merge pull request #153 from nextcloud/bugfix/noid/gettokenbyid-null-inputv14.0.0beta3
Fix "Argument 1 passed to OC\Authentication\Token\Manager::getTokenBy…
-rw-r--r--lib/Controller/PushController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php
index 4678e70..ce434ac 100644
--- a/lib/Controller/PushController.php
+++ b/lib/Controller/PushController.php
@@ -106,6 +106,9 @@ class PushController extends OCSController {
}
$tokenId = $this->session->get('token-id');
+ if (!\is_int($tokenId)) {
+ return new DataResponse(['message' => 'INVALID_SESSION_TOKEN'], Http::STATUS_BAD_REQUEST);
+ }
try {
$token = $this->tokenProvider->getTokenById($tokenId);
} catch (InvalidTokenException $e) {