aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-04-11 01:06:38 +0200
committerGitHub <noreply@github.com>2018-04-11 01:06:38 +0200
commit52c0e02bdcb734341ed53ef66b4b49bc47a47ff7 (patch)
treec3af328a737518f8304a7aa9ed95bd73bc2b5f33
parent38961a725f3b9243d9adaee078167c568c2a3dd6 (diff)
parenta07f6d46e331c52e902669c1f9987cfa7805b815 (diff)
downloadnextcloud-server-52c0e02bdcb734341ed53ef66b4b49bc47a47ff7.tar.gz
nextcloud-server-52c0e02bdcb734341ed53ef66b4b49bc47a47ff7.zip
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
-rw-r--r--core/Controller/LoginController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index ffa5b10fc2f..2235439d956 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -141,7 +141,8 @@ class LoginController extends Controller {
*
* @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()) {
return new RedirectResponse(OC_Util::getDefaultPageUrl());
}