Do not use a default regular expression for stripping off parts of a username when configuring an auto-login backend

There's no safe default for this.
This commit is contained in:
Eric Lippmann 2014-12-29 15:56:32 +01:00
parent e1bedc9afe
commit cfb52eeadb

View File

@ -53,8 +53,10 @@ class AutologinBackendForm extends Form
'strip_username_regexp', 'strip_username_regexp',
array( array(
'label' => t('Filter Pattern'), 'label' => t('Filter Pattern'),
'description' => t('The regular expression to use to strip specific parts off from usernames. Leave empty if you do not want to strip off anything'), 'description' => t(
'value' => '/\@[^$]+$/', 'The regular expression to use to strip specific parts off from usernames.'
. ' Leave empty if you do not want to strip off anything'
),
'validators' => array( 'validators' => array(
new Zend_Validate_Callback(function ($value) { new Zend_Validate_Callback(function ($value) {
return @preg_match($value, '') !== false; return @preg_match($value, '') !== false;