mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Deny slashes in usernames (#4780)
This commit is contained in:
parent
5c20ca98eb
commit
2bdc435486
@ -14,7 +14,8 @@ HumHub Changelog
|
||||
- Fix #4715: Call to `Content::canArchive()` throws error on global content
|
||||
- Fix #4744: Banner image orientation not being processed
|
||||
- Fix #4743: Hide "Like" link when no permission "Can like"
|
||||
- Fix #4768: Use only letters and digits from Space name for logo acronym (Thanks to @jrckmcsb)
|
||||
- Fix #4768: Use only letters and digits from Space name for logo acronym (Thanks to @jrckmcsb)
|
||||
- Fix #3617: Deny slashes in usernames
|
||||
|
||||
|
||||
1.7.1 (November 27, 2020)
|
||||
|
@ -148,7 +148,7 @@ class User extends ContentContainerActiveRecord implements IdentityInterface, Se
|
||||
[['username'], 'unique'],
|
||||
[['username'], 'string', 'max' => $userModule->maximumUsernameLength, 'min' => $userModule->minimumUsernameLength],
|
||||
// Client validation is disable due to invalid client pattern validation
|
||||
[['username'], 'match', 'not' => true, 'pattern' => '/[\x00-\x1f\x7f]/', 'message' => Yii::t('UserModule.base', 'Username contains invalid characters.'), 'enableClientValidation' => false],
|
||||
[['username'], 'match', 'not' => true, 'pattern' => '/[\x00-\x1f\x7f\/]/', 'message' => Yii::t('UserModule.base', 'Username contains invalid characters.'), 'enableClientValidation' => false],
|
||||
[['status', 'created_by', 'updated_by', 'visibility'], 'integer'],
|
||||
[['tags'], 'string'],
|
||||
[['guid'], 'string', 'max' => 45],
|
||||
|
@ -41,7 +41,7 @@ class AccountChangeUsername extends \yii\base\Model
|
||||
['newUsername', 'required'],
|
||||
['newUsername', 'string', 'min' => $userModule->minimumUsernameLength, 'max' => $userModule->maximumUsernameLength],
|
||||
['newUsername', 'unique', 'targetAttribute' => 'username', 'targetClass' => User::class, 'message' => '{attribute} "{value}" is already in use!'],
|
||||
['newUsername', 'match', 'not' => true, 'pattern' => '/[\x00-\x1f\x7f]/', 'message' => Yii::t('UserModule.base', 'Username contains invalid characters.'), 'enableClientValidation' => false],
|
||||
['newUsername', 'match', 'not' => true, 'pattern' => '/[\x00-\x1f\x7f\/]/', 'message' => Yii::t('UserModule.base', 'Username contains invalid characters.'), 'enableClientValidation' => false],
|
||||
['newUsername', 'trim'],
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user