mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Prevent user registration with confirmed status
Pull request https://github.com/strapi/strapi/pull/6072 aimed to add security by preventing creation of user with email confirmation enabled. By limiting user params to 'username', 'email', 'password', the current code do not allow adding custom field to user entity during registration which may breaks existing applications that have added required custom fields into user model . Signed-off-by: François Rosato <francois.rosato@ekino.com>
This commit is contained in:
parent
cd8ccb3c7a
commit
37e97d6219
@ -395,7 +395,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
const params = {
|
||||
..._.pick(ctx.request.body, ['username', 'email', 'password']),
|
||||
..._.omit(ctx.request.body, ['confirmed', 'resetPasswordToken']),
|
||||
provider: 'local',
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user