Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #650 from owncloud/stable9-93abceadf21ed2742ff44c2…
Browse files Browse the repository at this point in the history
…806a218cb90e74228

[stable9] Case share id to string
  • Loading branch information
DeepDiver1975 authored Jul 12, 2016
2 parents a1408a1 + 5ffd670 commit 402dd3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 402dd3e

Please sign in to comment.