From ef3b8bf08bd75b136f4a6774856cecd1dc9a2d91 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 29 Mar 2019 18:41:56 +0000 Subject: [PATCH] auth: Make 'LocalUserCreated' hook non-abortable Its return value was already not used. By using runWithoutAbort() it means that if a hook accidentally returns false, it will throw an exception instead of silently skipping other hook handlers. This type of mistake has repeatedly caused problems in WMF prod over the years. Change-Id: I6af2261957eb20f18fa5f0d50c4c4835d3850cfe --- includes/auth/AuthManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index 0c6218e6d4..bfe278b40a 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -1423,7 +1423,7 @@ class AuthManager implements LoggerAwareInterface { // @codeCoverageIgnoreEnd } $this->setDefaultUserOptions( $user, $creator->isAnon() ); - \Hooks::run( 'LocalUserCreated', [ $user, false ] ); + \Hooks::runWithoutAbort( 'LocalUserCreated', [ $user, false ] ); $user->saveSettings(); $state['userid'] = $user->getId(); -- 2.20.1