mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 02:12:40 +01:00
Merge pull request #1202 from DEVTomatoCake/fix/password-mfacode-schemas
Fixes for password, mfa code & email validation schemas
This commit is contained in:
commit
3a63ae89cc
@ -102,6 +102,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -174,6 +176,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -5606,6 +5610,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"undelete": {
|
||||
@ -5986,6 +5992,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"regenerate": {
|
||||
@ -6022,6 +6030,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
@ -6359,6 +6369,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -6370,9 +6382,13 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
},
|
||||
"secret": {
|
||||
@ -6497,15 +6513,22 @@
|
||||
"nullable": true
|
||||
},
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"new_password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"format": "email",
|
||||
"type": "string"
|
||||
},
|
||||
"discriminator": {
|
||||
@ -10945,6 +10968,12 @@
|
||||
},
|
||||
"tags": [
|
||||
"scheduled-maintenances"
|
||||
],
|
||||
"x-badges": [
|
||||
{
|
||||
"label": "Spacebar-only",
|
||||
"color": "red"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -75,6 +75,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -155,6 +157,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -87935,6 +87939,8 @@
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"undelete": {
|
||||
@ -122124,6 +122130,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"regenerate": {
|
||||
@ -131818,6 +131826,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
@ -190102,6 +190112,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -194942,9 +194954,13 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
},
|
||||
"secret": {
|
||||
@ -214395,15 +214411,22 @@
|
||||
]
|
||||
},
|
||||
"password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"new_password": {
|
||||
"minLength": 1,
|
||||
"maxLength": 72,
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"minLength": 6,
|
||||
"maxLength": 6,
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"format": "email",
|
||||
"type": "string"
|
||||
},
|
||||
"discriminator": {
|
||||
|
@ -21,5 +21,9 @@ export interface ApplicationAuthorizeSchema {
|
||||
guild_id: string;
|
||||
permissions: string;
|
||||
captcha_key?: string;
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code?: string; // 2fa code
|
||||
}
|
||||
|
@ -17,5 +17,9 @@
|
||||
*/
|
||||
|
||||
export interface BackupCodesChallengeSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
|
@ -18,6 +18,10 @@
|
||||
|
||||
export interface LoginSchema {
|
||||
login: string;
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
undelete?: boolean;
|
||||
captcha_key?: string;
|
||||
|
@ -17,6 +17,10 @@
|
||||
*/
|
||||
|
||||
export interface MfaCodesSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
regenerate?: boolean;
|
||||
}
|
||||
|
@ -17,6 +17,10 @@
|
||||
*/
|
||||
|
||||
export interface PasswordResetSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
token: string;
|
||||
}
|
||||
|
@ -17,5 +17,9 @@
|
||||
*/
|
||||
|
||||
export interface TotpDisableSchema {
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code: string;
|
||||
}
|
||||
|
@ -17,7 +17,15 @@
|
||||
*/
|
||||
|
||||
export interface TotpEnableSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code?: string;
|
||||
secret?: string;
|
||||
}
|
||||
|
@ -25,9 +25,24 @@ export interface UserModifySchema {
|
||||
bio?: string;
|
||||
accent_color?: number;
|
||||
banner?: string | null;
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
new_password?: string;
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* @TJS-format email
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* @minLength 4
|
||||
|
Loading…
Reference in New Issue
Block a user