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

View file

@ -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());
}