From: Platonides Date: Wed, 27 Oct 2010 22:27:23 +0000 (+0000) Subject: Do NOT use hardcoded passwords! Not even if the user agreed to run destructive tests. X-Git-Tag: 1.31.0-rc.0~34246 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=0e491a12afa2b678bbe4f3dcf87a2fc908c27db9;p=lhc%2Fweb%2Fwiklou.git Do NOT use hardcoded passwords! Not even if the user agreed to run destructive tests. The affected passwords have been disabled in r75588 Follow up r72475,r74213. Additionally give descriptive names to the users. Also see the mail to wikitech. --- diff --git a/maintenance/tests/phpunit/includes/api/ApiSetup.php b/maintenance/tests/phpunit/includes/api/ApiSetup.php index 54f2fa5953..7ffa807003 100644 --- a/maintenance/tests/phpunit/includes/api/ApiSetup.php +++ b/maintenance/tests/phpunit/includes/api/ApiSetup.php @@ -33,8 +33,8 @@ abstract class ApiTestSetup extends PHPUnit_Framework_TestCase { static function setupUser() { if ( self::$user == null || self::$sysopUser == null ) { - self::$user = new UserWrapper( 'Useruser', 'Passpass' ); - self::$sysopUser = new UserWrapper( 'Useruser1', 'Passpass1', 'sysop' ); + self::$user = new UserWrapper( 'User for MediaWiki automated tests', User::randomPassword() ); + self::$sysopUser = new UserWrapper( 'Sysop for MediaWiki automated tests', User::randomPassword(), 'sysop' ); } $GLOBALS['wgUser'] = self::$sysopUser->user; @@ -67,3 +67,4 @@ class UserWrapper { $this->user->saveSettings(); } } +