From 7d1fc2b8e84039a918aabf1431ba131f7989880e Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 11 Jun 2019 07:26:41 +0200 Subject: [PATCH] Fix missing login hook wih Apache/SAML Without this patch the hook does not transport the information whether the login is done with an app password or not. The suspicious login app requires the parameter to function correctly, hence adding it will make suspicious login detection also possible with SAML users. Signed-off-by: Christoph Wurst --- lib/private/legacy/user.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php index f1c23381987..175c8f2e5d6 100644 --- a/lib/private/legacy/user.php +++ b/lib/private/legacy/user.php @@ -181,7 +181,15 @@ class OC_User { // completed before we can safely create the users folder. // For example encryption needs to initialize the users keys first // before we can create the user folder with the skeleton files - OC_Hook::emit("OC_User", "post_login", array("uid" => $uid, 'password' => '')); + OC_Hook::emit( + 'OC_User', + 'post_login', + [ + 'uid' => $uid, + 'password' => '', + 'isTokenLogin' => false, + ] + ); //trigger creation of user home and /files folder \OC::$server->getUserFolder($uid); } -- 2.39.5