mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
feat(API): permissive email check in login, reset & verification (#6648)
* feat(API): permissive email check in reset & verification In order to not force users to be case sensitive when asking for password reset or resend email verification. When there's multiple emails where the only difference in the local is the capitalized letters, in those cases the users has to be case sensitive. closes #6570 * feat(API/login): permissive email handling Allow case insensitive email when there's no other candidate. closes #6570 * code review changes * Fix tests * Add more duplicate email checks --------- Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
parent
9f64909fc7
commit
a51fb3f35e
17 changed files with 247 additions and 92 deletions
|
@ -161,6 +161,7 @@ export class UsersCommand extends AbstractCommand {
|
|||
videoQuotaDaily?: number
|
||||
role?: UserRoleType
|
||||
adminFlags?: UserAdminFlagType
|
||||
email?: string
|
||||
}) {
|
||||
const {
|
||||
username,
|
||||
|
@ -168,7 +169,8 @@ export class UsersCommand extends AbstractCommand {
|
|||
password = 'password',
|
||||
videoQuota,
|
||||
videoQuotaDaily,
|
||||
role = UserRole.USER
|
||||
role = UserRole.USER,
|
||||
email = username + '@example.com'
|
||||
} = options
|
||||
|
||||
const path = '/api/v1/users'
|
||||
|
@ -182,7 +184,7 @@ export class UsersCommand extends AbstractCommand {
|
|||
password,
|
||||
role,
|
||||
adminFlags,
|
||||
email: username + '@example.com',
|
||||
email,
|
||||
videoQuota,
|
||||
videoQuotaDaily
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue