Merge pull request #8910 from nextcloud/fix-login-error

Avoid to leak a user ID that is not a string to reach a user backend
This commit is contained in:
Morris Jobke 2018-04-11 01:06:38 +02:00 committed by GitHub
commit 52c0e02bdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -141,7 +141,8 @@ class LoginController extends Controller {
* *
* @return TemplateResponse|RedirectResponse * @return TemplateResponse|RedirectResponse
*/ */
public function showLoginForm($user, $redirect_url) { public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response {
if ($this->userSession->isLoggedIn()) { if ($this->userSession->isLoggedIn()) {
return new RedirectResponse(OC_Util::getDefaultPageUrl()); return new RedirectResponse(OC_Util::getDefaultPageUrl());
} }