Andrew Bogott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/205877
Change subject: Use titleblacklist for shellnames as well as account names.
......................................................................
Use titleblacklist for shellnames as well as account names.
Change-Id: I62bdbba665313a2b350b8455f81a8d4f876aa580
---
M nova/OpenStackNovaUser.php
1 file changed, 7 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager
refs/changes/77/205877/1
diff --git a/nova/OpenStackNovaUser.php b/nova/OpenStackNovaUser.php
index a24d180..bbddaf9 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 );
+ } else {
+ return true;
+ }
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/205877
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62bdbba665313a2b350b8455f81a8d4f876aa580
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits