jenkins-bot has submitted this change and it was merged.

Change subject: Use titleblacklist for shellnames as well as account names.
......................................................................


Use titleblacklist for shellnames as well as account names.

Bug: T93549
Bug: T93543
Change-Id: I62bdbba665313a2b350b8455f81a8d4f876aa580
---
M nova/OpenStackNovaUser.php
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/nova/OpenStackNovaUser.php b/nova/OpenStackNovaUser.php
index a24d180..1002f08 100644
--- a/nova/OpenStackNovaUser.php
+++ b/nova/OpenStackNovaUser.php
@@ -576,6 +576,7 @@
        static function AbortNewAccount( $user, &$message ) {
                global $wgRequest;
                global $wgAuth;
+               global $wgUser;
 
                $shellaccountname = $wgRequest->getText( 'shellaccountname' );
                if ( ! preg_match( "/^[a-z][a-z0-9\-_]*$/", $shellaccountname ) 
) {
@@ -594,7 +595,12 @@
                                return false;
                        }
                }
-               return true;
+
+               if ( class_exists( 'TitleBlacklist' ) ) {
+                       return TitleBlacklistHooks::acceptNewUserName( 
$shellaccountname, $wgUser, $message, $override = false, $log = true );
+               } else {
+                       return true;
+               }
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/205877
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I62bdbba665313a2b350b8455f81a8d4f876aa580
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Tim Landscheidt <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to