Merge pull request #357 from owncloud/advanced-password

Check session token
This commit is contained in:
VicDeo 2014-09-08 23:43:12 +03:00
commit 3b70fe07f9
2 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,9 @@ class SessionController extends Controller{
try {
$token = Helper::getArrayValueByKey($args, 'token');
$file = File::getByShareToken($token);
if ($file->isPasswordProtected() && !$file->checkPassword('')){
throw new \Exception('Not authorized');
}
$session = Db\Session::start($uid, $file);
\OCP\JSON::success($session);
} catch (\Exception $e){