[TYPO3-core] RFC: Bugfix #5630: Install tool removes dots from admin usernames and replace ereg_replace with preg_replace

Stefano Kowalke blueduck at gmx.net
Sun Jan 11 02:05:51 CET 2009


Hi!

This is a patch request.

BT reference: http://bugs.typo3.org/view.php?id=5630

Branch: 4.2, trunk

Problem: 
When attempting to create admin user with the following username:
vlatko.surlan the dot gets removed from the username and finally user
vlatkosurlan gets created. If this is a feature then it is a bad one. It
should either reject the username as invalid or create it as specified but
not modify user input under the hood and create something modified.

Solution:
* add the dot "." to the regex:
Before:
[^[:alnum:]_-]

After:
[^[:alnum:]._-]


* replace ereg_replace with preg_replace
Before:
ereg_replace('[^[:alnum:]._-] ...

After
preg_replace('[^A-Za-z0-9._-] ...


Note:
This issue was reported by Vlatko Šurlan

Cheers
Stefano 
-- 
Seit dem 1.1.2008 werden Daten zu jeder E-Mail verdachtsunabhängig gespeichert! 
Weitere Informationen: www.vorratsdatenspeicherung.de
GPG-ID: 0x2B08936D
Key-Fingerprint: 7F31 BCF0 70C0 B3B1 1235 07E9 1777 D7A0 2B08 936D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class.tx_install.php_4.2.3.diff
Type: text/x-diff
Size: 800 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090111/02b7ce59/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class.tx_install.php_trunk.diff
Type: text/x-diff
Size: 799 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090111/02b7ce59/attachment-0001.diff 


More information about the TYPO3-team-core mailing list