Browse Source

Avoid to leak a user ID that is not a string to reach a user backend

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
tags/v14.0.0beta1
Morris Jobke 6 years ago
parent
commit
fd3c97b93b
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      core/Controller/LoginController.php

+ 4
- 0
core/Controller/LoginController.php View File

@@ -142,6 +142,10 @@ class LoginController extends Controller {
* @return TemplateResponse|RedirectResponse
*/
public function showLoginForm($user, $redirect_url) {
if (!is_string($user)) {
throw new \InvalidArgumentException('User needs to be string');
}

if ($this->userSession->isLoggedIn()) {
return new RedirectResponse(OC_Util::getDefaultPageUrl());
}

Loading…
Cancel
Save