From 93abceadf21ed2742ff44c2806a218cb90e74228 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 7 Jul 2016 08:31:18 +0200 Subject: [PATCH] Case share id to string --- lib/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/file.php b/lib/file.php index a112cf6e..12c7c735 100644 --- a/lib/file.php +++ b/lib/file.php @@ -109,7 +109,7 @@ public function checkPassword($password){ $shareId = $this->sharing['id']; if (!$this->isPasswordProtected() || (\OC::$server->getSession()->exists('public_link_authenticated') - && \OC::$server->getSession()->get('public_link_authenticated') === $shareId + && \OC::$server->getSession()->get('public_link_authenticated') === (string)$shareId ) ){ return true; @@ -118,7 +118,7 @@ public function checkPassword($password){ // Check Password $newHash = ''; if(\OC::$server->getHasher()->verify($password, $this->getPassword(), $newHash)) { - \OC::$server->getSession()->set('public_link_authenticated', $shareId); + \OC::$server->getSession()->set('public_link_authenticated', (string)$shareId); /** * FIXME: Migrate old hashes to new hash format