From cf3873d62ff30da691dae7f7424c6365b5a72edc Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 17 Jul 2022 18:52:41 +0200 Subject: Add local disk caching for fetched assets --- api/assets/inline-plugins/autoRegister.js | 62 ++++++++++ api/assets/inline-plugins/fosscord-login.js | 12 ++ api/assets/preload-plugins/autoRegister.js | 62 ---------- api/assets/preload-plugins/fosscord-login.js | 12 -- api/client_test/index.html | 1 + api/package.json | 2 +- api/src/middlewares/TestClient.ts | 165 +++++++++++++++++---------- api/src/util/entities/AssetCacheItem.ts | 16 +++ api/src/util/index.ts | 1 + 9 files changed, 196 insertions(+), 137 deletions(-) create mode 100644 api/assets/inline-plugins/autoRegister.js create mode 100644 api/assets/inline-plugins/fosscord-login.js delete mode 100644 api/assets/preload-plugins/autoRegister.js delete mode 100644 api/assets/preload-plugins/fosscord-login.js create mode 100644 api/src/util/entities/AssetCacheItem.ts (limited to 'api') diff --git a/api/assets/inline-plugins/autoRegister.js b/api/assets/inline-plugins/autoRegister.js new file mode 100644 index 00000000..bb0b903d --- /dev/null +++ b/api/assets/inline-plugins/autoRegister.js @@ -0,0 +1,62 @@ +// Auto register guest account: +const prefix = [ + "mysterious", + "adventurous", + "courageous", + "precious", + "cynical", + "flamer ", + "despicable", + "suspicious", + "gorgeous", + "impeccable", + "lovely", + "stunning", + "keyed", + "phoned", + "glorious", + "amazing", + "strange", + "arcane" +]; +const suffix = [ + "Anonymous", + "Boy", + "Lurker", + "Keyhitter", + "User", + "Enjoyer", + "Hunk", + "Coolstar", + "Wrestling", + "TylerTheCreator", + "Ad", + "Gamer", + "Games", + "Programmer" +]; + +Array.prototype.random = function () { + return this[Math.floor(Math.random() * this.length)]; +}; + +function _generateName() { + return `${prefix.random()}${suffix.random()}`; +} + +var token = JSON.parse(localStorage.getItem("token")); +if (!token && location.pathname !== "/login" && location.pathname !== "/register") { + fetch(`${window.GLOBAL_ENV.API_ENDPOINT}/auth/register`, { + method: "POST", + headers: { "content-type": "application/json" }, + body: JSON.stringify({ username: `${_generateName()}`, consent: true }) //${Date.now().toString().slice(-4)} + }) + .then((x) => x.json()) + .then((x) => { + localStorage.setItem("token", `"${x.token}"`); + if (!window.localStorage) { + // client already loaded -> need to reload to apply the newly registered user token + location.reload(); + } + }); +} diff --git a/api/assets/inline-plugins/fosscord-login.js b/api/assets/inline-plugins/fosscord-login.js new file mode 100644 index 00000000..38f82200 --- /dev/null +++ b/api/assets/inline-plugins/fosscord-login.js @@ -0,0 +1,12 @@ +// Remove `` from header when we're not accessing `/login` or `/register` +// fosscord-login.css replaces discord's TOS tooltip with something more fitting for fosscord, which when included in the main app, causes other tooltips +// to be affected, which is potentially unwanted. +// +// This script removes fosscord-login.css when a user reloads the page. From testing, it appears fosscord already properly removes +// fosscord-login.css after login is successful, but not if you reload the page after logging in. This script is to remove fosscord-login.css in +// that specific case. + +var token = JSON.parse(localStorage.getItem("token")); +if (!token && location.pathname !== "/login" && location.pathname !== "/register") { + document.getElementById("logincss").remove(); +} diff --git a/api/assets/preload-plugins/autoRegister.js b/api/assets/preload-plugins/autoRegister.js deleted file mode 100644 index bb0b903d..00000000 --- a/api/assets/preload-plugins/autoRegister.js +++ /dev/null @@ -1,62 +0,0 @@ -// Auto register guest account: -const prefix = [ - "mysterious", - "adventurous", - "courageous", - "precious", - "cynical", - "flamer ", - "despicable", - "suspicious", - "gorgeous", - "impeccable", - "lovely", - "stunning", - "keyed", - "phoned", - "glorious", - "amazing", - "strange", - "arcane" -]; -const suffix = [ - "Anonymous", - "Boy", - "Lurker", - "Keyhitter", - "User", - "Enjoyer", - "Hunk", - "Coolstar", - "Wrestling", - "TylerTheCreator", - "Ad", - "Gamer", - "Games", - "Programmer" -]; - -Array.prototype.random = function () { - return this[Math.floor(Math.random() * this.length)]; -}; - -function _generateName() { - return `${prefix.random()}${suffix.random()}`; -} - -var token = JSON.parse(localStorage.getItem("token")); -if (!token && location.pathname !== "/login" && location.pathname !== "/register") { - fetch(`${window.GLOBAL_ENV.API_ENDPOINT}/auth/register`, { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ username: `${_generateName()}`, consent: true }) //${Date.now().toString().slice(-4)} - }) - .then((x) => x.json()) - .then((x) => { - localStorage.setItem("token", `"${x.token}"`); - if (!window.localStorage) { - // client already loaded -> need to reload to apply the newly registered user token - location.reload(); - } - }); -} diff --git a/api/assets/preload-plugins/fosscord-login.js b/api/assets/preload-plugins/fosscord-login.js deleted file mode 100644 index 38f82200..00000000 --- a/api/assets/preload-plugins/fosscord-login.js +++ /dev/null @@ -1,12 +0,0 @@ -// Remove `` from header when we're not accessing `/login` or `/register` -// fosscord-login.css replaces discord's TOS tooltip with something more fitting for fosscord, which when included in the main app, causes other tooltips -// to be affected, which is potentially unwanted. -// -// This script removes fosscord-login.css when a user reloads the page. From testing, it appears fosscord already properly removes -// fosscord-login.css after login is successful, but not if you reload the page after logging in. This script is to remove fosscord-login.css in -// that specific case. - -var token = JSON.parse(localStorage.getItem("token")); -if (!token && location.pathname !== "/login" && location.pathname !== "/register") { - document.getElementById("logincss").remove(); -} diff --git a/api/client_test/index.html b/api/client_test/index.html index b438b492..7a4fe627 100644 --- a/api/client_test/index.html +++ b/api/client_test/index.html @@ -7,6 +7,7 @@ + diff --git a/api/package.json b/api/package.json index 29fa82a1..051666e9 100644 --- a/api/package.json +++ b/api/package.json @@ -48,7 +48,7 @@ "@types/jsonwebtoken": "^8.5.0", "@types/morgan": "^1.9.3", "@types/multer": "^1.4.5", - "@types/node": "^14.17.9", + "@types/node": "^14.18.22", "@types/node-fetch": "^2.5.5", "@types/supertest": "^2.0.11", "@zerollup/ts-transform-paths": "^1.7.18", diff --git a/api/src/middlewares/TestClient.ts b/api/src/middlewares/TestClient.ts index ecf87681..e52a5e59 100644 --- a/api/src/middlewares/TestClient.ts +++ b/api/src/middlewares/TestClient.ts @@ -1,54 +1,47 @@ import express, { Request, Response, Application } from "express"; -import fs from "fs"; +import fs, { writeFile } from "fs"; import path from "path"; -import fetch, { Response as FetchResponse } from "node-fetch"; +import fetch, { Response as FetchResponse, Headers } from "node-fetch"; import ProxyAgent from 'proxy-agent'; import { Config } from "@fosscord/util"; +import { AssetCacheItem } from "../util/entities/AssetCacheItem" +import { FileLogger } from "typeorm"; export default function TestClient(app: Application) { const agent = new ProxyAgent(); - const assetCache = new Map(); - const indexHTML = fs.readFileSync(path.join(__dirname, "..", "..", "client_test", "index.html"), { encoding: "utf8" }); - - var html = indexHTML; - const CDN_ENDPOINT = (Config.get().cdn.endpointClient || Config.get()?.cdn.endpointPublic || process.env.CDN || "").replace( - /(https?)?(:\/\/?)/g, - "" - ); - const GATEWAY_ENDPOINT = Config.get().gateway.endpointClient || Config.get()?.gateway.endpointPublic || process.env.GATEWAY || ""; + + //build client page + let html = fs.readFileSync(path.join(__dirname, "..", "..", "client_test", "index.html"), { encoding: "utf8" }); + html = applyEnv(html); + html = applyInlinePlugins(html); + html = applyPlugins(html); + html = applyPreloadPlugins(html); - if (CDN_ENDPOINT) { - html = html.replace(/CDN_HOST: .+/, `CDN_HOST: \`${CDN_ENDPOINT}\`,`); + //load asset cache + let newAssetCache: Map = new Map(); + if(!fs.existsSync(path.join(__dirname, "..", "..", "assets", "cache"))) { + fs.mkdirSync(path.join(__dirname, "..", "..", "assets", "cache")); } - if (GATEWAY_ENDPOINT) { - html = html.replace(/GATEWAY_ENDPOINT: .+/, `GATEWAY_ENDPOINT: \`${GATEWAY_ENDPOINT}\`,`); + if(fs.existsSync(path.join(__dirname, "..", "..", "assets", "cache", "index.json"))) { + let rawdata = fs.readFileSync(path.join(__dirname, "..", "..", "assets", "cache", "index.json")); + newAssetCache = new Map(Object.entries(JSON.parse(rawdata.toString()))); } - // inline plugins - var files = fs.readdirSync(path.join(__dirname, "..", "..", "assets", "preload-plugins")); - var plugins = ""; - files.forEach(x =>{if(x.endsWith(".js")) plugins += `\n`; }); - html = html.replaceAll("", plugins); - // plugins - files = fs.readdirSync(path.join(__dirname, "..", "..", "assets", "plugins")); - plugins = ""; - files.forEach(x =>{if(x.endsWith(".js")) plugins += `\n`; }); - html = html.replaceAll("", plugins); - //preload plugins - files = fs.readdirSync(path.join(__dirname, "..", "..", "assets", "preload-plugins")); - plugins = ""; - files.forEach(x =>{if(x.endsWith(".js")) plugins += `\n`; }); - html = html.replaceAll("", plugins); - - - app.use("/assets", express.static(path.join(__dirname, "..", "..", "assets"))); - + //define routes + app.use("/assets", express.static(path.join(__dirname, "..", "..", "assets"))); app.get("/assets/:file", async (req: Request, res: Response) => { delete req.headers.host; - var response: FetchResponse; - var buffer: Buffer; - const cache = assetCache.get(req.params.file); - if (!cache) { + let response: FetchResponse; + let buffer: Buffer; + let assetCacheItem: AssetCacheItem = new AssetCacheItem(req.params.file); + if(newAssetCache.has(req.params.file)){ + assetCacheItem = newAssetCache.get(req.params.file)!; + assetCacheItem.Headers.forEach((value: any, name: any) => { + res.set(name, value); + }); + } + else { + console.log(`CACHE MISS! Asset file: ${req.params.file}`); response = await fetch(`https://discord.com/assets/${req.params.file}`, { agent, // @ts-ignore @@ -56,34 +49,24 @@ export default function TestClient(app: Application) { ...req.headers } }); - buffer = await response.buffer(); - } else { - response = cache.response; - buffer = cache.buffer; + + //set cache info + assetCacheItem.Headers = Object.fromEntries(stripHeaders(response.headers)); + assetCacheItem.FilePath = path.join(__dirname, "..", "..", "assets", "cache", req.params.file); + assetCacheItem.Key = req.params.file; + //add to cache and save + newAssetCache.set(req.params.file, assetCacheItem); + fs.writeFileSync(path.join(__dirname, "..", "..", "assets", "cache", "index.json"), JSON.stringify(Object.fromEntries(newAssetCache), null, 4)); + //download file + fs.writeFileSync(assetCacheItem.FilePath, await response.buffer()); } - - response.headers.forEach((value, name) => { - if ( - [ - "content-length", - "content-security-policy", - "strict-transport-security", - "set-cookie", - "transfer-encoding", - "expect-ct", - "access-control-allow-origin", - "content-encoding" - ].includes(name.toLowerCase()) - ) { - return; - } + + assetCacheItem.Headers.forEach((value: string, name: string) => { res.set(name, value); }); - assetCache.set(req.params.file, { buffer, response }); - - return res.send(buffer); + return res.send(fs.readFileSync(assetCacheItem.FilePath)); }); - app.get("/developers*", (req: Request, res: Response) => { + app.get("/developers*", (_req: Request, res: Response) => { const { useTestClient } = Config.get().client; res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24); res.set("content-type", "text/html"); @@ -104,4 +87,62 @@ export default function TestClient(app: Application) { res.send(html); }); + + +} + +function applyEnv(html: string): string { + const CDN_ENDPOINT = (Config.get().cdn.endpointClient || Config.get()?.cdn.endpointPublic || process.env.CDN || "").replace( + /(https?)?(:\/\/?)/g, + "" + ); + const GATEWAY_ENDPOINT = Config.get().gateway.endpointClient || Config.get()?.gateway.endpointPublic || process.env.GATEWAY || ""; + + if (CDN_ENDPOINT) { + html = html.replace(/CDN_HOST: .+/, `CDN_HOST: \`${CDN_ENDPOINT}\`,`); + } + if (GATEWAY_ENDPOINT) { + html = html.replace(/GATEWAY_ENDPOINT: .+/, `GATEWAY_ENDPOINT: \`${GATEWAY_ENDPOINT}\`,`); + } + return html; +} + +function applyPlugins(html: string): string { + // plugins + let files = fs.readdirSync(path.join(__dirname, "..", "..", "assets", "plugins")); + let plugins = ""; + files.forEach(x =>{if(x.endsWith(".js")) plugins += `\n`; }); + return html.replaceAll("", plugins); +} + +function applyInlinePlugins(html: string): string{ + // inline plugins + let files = fs.readdirSync(path.join(__dirname, "..", "..", "assets", "inline-plugins")); + let plugins = ""; + files.forEach(x =>{if(x.endsWith(".js")) plugins += `\n\n`; }); + return html.replaceAll("", plugins); +} + +function applyPreloadPlugins(html: string): string{ + //preload plugins + let files = fs.readdirSync(path.join(__dirname, "..", "..", "assets", "preload-plugins")); + let plugins = ""; + files.forEach(x =>{if(x.endsWith(".js")) plugins += `\n`; }); + return html.replaceAll("", plugins); +} + +function stripHeaders(headers: Headers): Headers { + [ + "content-length", + "content-security-policy", + "strict-transport-security", + "set-cookie", + "transfer-encoding", + "expect-ct", + "access-control-allow-origin", + "content-encoding" + ].forEach(headerName => { + headers.delete(headerName); + }); + return headers; } \ No newline at end of file diff --git a/api/src/util/entities/AssetCacheItem.ts b/api/src/util/entities/AssetCacheItem.ts new file mode 100644 index 00000000..7fb4e1e6 --- /dev/null +++ b/api/src/util/entities/AssetCacheItem.ts @@ -0,0 +1,16 @@ +import { Headers } from "node-fetch"; + +export class AssetCacheItem { + public Key: string; + public FilePath: string; + public Headers: any; + + constructor(key: string){ + this.Key = key; + } + /*constructor(key: string, filePath: string, headers: Headers) { + this.Key = key; + this.FilePath = filePath; + this.Headers = headers; + }*/ +} \ No newline at end of file diff --git a/api/src/util/index.ts b/api/src/util/index.ts index ffbcf24e..ac439371 100644 --- a/api/src/util/index.ts +++ b/api/src/util/index.ts @@ -6,3 +6,4 @@ export * from "./utility/RandomInviteID"; export * from "./handlers/route"; export * from "./utility/String"; export * from "./handlers/Voice"; +export * from "./entities/AssetCacheItem"; \ No newline at end of file -- cgit 1.5.1 From 1c2cddb7c4be9fa75eabf3ec9424afd6cb032a7c Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Wed, 20 Jul 2022 17:39:16 +1000 Subject: 2fa --- api/assets/schemas.json | 2597 +++++++++++++++++++------- api/locales/en/auth.json | 4 +- api/src/middlewares/Authentication.ts | 1 + api/src/routes/auth/login.ts | 17 +- api/src/routes/auth/mfa/totp.ts | 49 + api/src/routes/users/@me/mfa/codes.ts | 48 + api/src/routes/users/@me/mfa/totp/disable.ts | 45 + api/src/routes/users/@me/mfa/totp/enable.ts | 51 + util/src/entities/BackupCodes.ts | 35 + util/src/entities/User.ts | 8 +- util/src/entities/index.ts | 3 +- 11 files changed, 2212 insertions(+), 646 deletions(-) create mode 100644 api/src/routes/auth/mfa/totp.ts create mode 100644 api/src/routes/users/@me/mfa/codes.ts create mode 100644 api/src/routes/users/@me/mfa/totp/disable.ts create mode 100644 api/src/routes/users/@me/mfa/totp/enable.ts create mode 100644 util/src/entities/BackupCodes.ts (limited to 'api') diff --git a/api/assets/schemas.json b/api/assets/schemas.json index 2102292b..4249eb81 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -1072,46 +1072,32 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "RegisterSchema": { + "TotpSchema": { "type": "object", "properties": { - "username": { - "minLength": 2, - "maxLength": 32, - "type": "string" - }, - "password": { - "minLength": 1, - "maxLength": 72, - "type": "string" - }, - "consent": { - "type": "boolean" - }, - "email": { - "format": "email", - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "invite": { + "code": { "type": "string" }, - "date_of_birth": { + "ticket": { "type": "string" }, "gift_code_sku_id": { - "type": "string" + "type": [ + "null", + "string" + ] }, - "captcha_key": { - "type": "string" + "login_source": { + "type": [ + "null", + "string" + ] } }, "additionalProperties": false, "required": [ - "consent", - "username" + "code", + "ticket" ], "definitions": { "Embed": { @@ -1424,104 +1410,47 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "ChannelModifySchema": { + "RegisterSchema": { "type": "object", "properties": { - "name": { - "maxLength": 100, + "username": { + "minLength": 2, + "maxLength": 32, "type": "string" }, - "type": { - "enum": [ - 0, - 1, - 10, - 11, - 12, - 13, - 14, - 15, - 2, - 255, - 3, - 33, - 34, - 35, - 4, - 5, - 6, - 64, - 7, - 8, - 9 - ], - "type": "number" - }, - "topic": { + "password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "icon": { - "type": [ - "null", - "string" - ] - }, - "bitrate": { - "type": "integer" - }, - "user_limit": { - "type": "integer" - }, - "rate_limit_per_user": { - "type": "integer" - }, - "position": { - "type": "integer" + "consent": { + "type": "boolean" }, - "permission_overwrites": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/ChannelPermissionOverwriteType" - }, - "allow": { - "type": "string" - }, - "deny": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "allow", - "deny", - "id", - "type" - ] - } + "email": { + "format": "email", + "type": "string" }, - "parent_id": { + "fingerprint": { "type": "string" }, - "id": { + "invite": { "type": "string" }, - "nsfw": { - "type": "boolean" + "date_of_birth": { + "type": "string" }, - "rtc_region": { + "gift_code_sku_id": { "type": "string" }, - "default_auto_archive_duration": { - "type": "integer" + "captcha_key": { + "type": "string" } }, "additionalProperties": false, + "required": [ + "consent", + "username" + ], "definitions": { "Embed": { "type": "object", @@ -1833,34 +1762,100 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "InviteCreateSchema": { + "ChannelModifySchema": { "type": "object", "properties": { - "target_user_id": { + "name": { + "maxLength": 100, "type": "string" }, - "target_type": { - "type": "string" + "type": { + "enum": [ + 0, + 1, + 10, + 11, + 12, + 13, + 14, + 15, + 2, + 255, + 3, + 33, + 34, + 35, + 4, + 5, + 6, + 64, + 7, + 8, + 9 + ], + "type": "number" }, - "validate": { + "topic": { "type": "string" }, - "max_age": { + "icon": { + "type": [ + "null", + "string" + ] + }, + "bitrate": { "type": "integer" }, - "max_uses": { + "user_limit": { "type": "integer" }, - "temporary": { - "type": "boolean" + "rate_limit_per_user": { + "type": "integer" }, - "unique": { + "position": { + "type": "integer" + }, + "permission_overwrites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + }, + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "allow", + "deny", + "id", + "type" + ] + } + }, + "parent_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "nsfw": { "type": "boolean" }, - "target_user": { + "rtc_region": { "type": "string" }, - "target_user_type": { + "default_auto_archive_duration": { "type": "integer" } }, @@ -2176,17 +2171,1345 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "MessageAcknowledgeSchema": { + "InviteCreateSchema": { "type": "object", "properties": { - "manual": { - "type": "boolean" + "target_user_id": { + "type": "string" }, - "mention_count": { + "target_type": { + "type": "string" + }, + "validate": { + "type": "string" + }, + "max_age": { + "type": "integer" + }, + "max_uses": { "type": "integer" + }, + "temporary": { + "type": "boolean" + }, + "unique": { + "type": "boolean" + }, + "target_user": { + "type": "string" + }, + "target_user_type": { + "type": "integer" + } + }, + "additionalProperties": false, + "definitions": { + "Embed": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "type": { + "enum": [ + "article", + "gifv", + "image", + "link", + "rich", + "video" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "url": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "color": { + "type": "integer" + }, + "footer": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "text" + ] + }, + "image": { + "$ref": "#/definitions/EmbedImage" + }, + "thumbnail": { + "$ref": "#/definitions/EmbedImage" + }, + "video": { + "$ref": "#/definitions/EmbedImage" + }, + "provider": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inline": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "value" + ] + } + } + }, + "additionalProperties": false + }, + "EmbedImage": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "proxy_url": { + "type": "string" + }, + "height": { + "type": "integer" + }, + "width": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "Record": { + "type": "object", + "additionalProperties": false + }, + "ChannelPermissionOverwriteType": { + "enum": [ + 0, + 1, + 2 + ], + "type": "number" + }, + "ChannelModifySchema": { + "type": "object", + "properties": { + "name": { + "maxLength": 100, + "type": "string" + }, + "type": { + "enum": [ + 0, + 1, + 10, + 11, + 12, + 13, + 14, + 15, + 2, + 255, + 3, + 33, + 34, + 35, + 4, + 5, + 6, + 64, + 7, + 8, + 9 + ], + "type": "number" + }, + "topic": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "bitrate": { + "type": "integer" + }, + "user_limit": { + "type": "integer" + }, + "rate_limit_per_user": { + "type": "integer" + }, + "position": { + "type": "integer" + }, + "permission_overwrites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + }, + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "allow", + "deny", + "id", + "type" + ] + } + }, + "parent_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "rtc_region": { + "type": "string" + }, + "default_auto_archive_duration": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "UserPublic": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "accent_color": { + "type": "integer" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "bot": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "public_flags", + "username" + ] + }, + "PublicConnectedAccount": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "verified" + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "MessageAcknowledgeSchema": { + "type": "object", + "properties": { + "manual": { + "type": "boolean" + }, + "mention_count": { + "type": "integer" + } + }, + "additionalProperties": false, + "definitions": { + "Embed": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "type": { + "enum": [ + "article", + "gifv", + "image", + "link", + "rich", + "video" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "url": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "color": { + "type": "integer" + }, + "footer": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "text" + ] + }, + "image": { + "$ref": "#/definitions/EmbedImage" + }, + "thumbnail": { + "$ref": "#/definitions/EmbedImage" + }, + "video": { + "$ref": "#/definitions/EmbedImage" + }, + "provider": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inline": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "value" + ] + } + } + }, + "additionalProperties": false + }, + "EmbedImage": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "proxy_url": { + "type": "string" + }, + "height": { + "type": "integer" + }, + "width": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "Record": { + "type": "object", + "additionalProperties": false + }, + "ChannelPermissionOverwriteType": { + "enum": [ + 0, + 1, + 2 + ], + "type": "number" + }, + "ChannelModifySchema": { + "type": "object", + "properties": { + "name": { + "maxLength": 100, + "type": "string" + }, + "type": { + "enum": [ + 0, + 1, + 10, + 11, + 12, + 13, + 14, + 15, + 2, + 255, + 3, + 33, + 34, + 35, + 4, + 5, + 6, + 64, + 7, + 8, + 9 + ], + "type": "number" + }, + "topic": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "bitrate": { + "type": "integer" + }, + "user_limit": { + "type": "integer" + }, + "rate_limit_per_user": { + "type": "integer" + }, + "position": { + "type": "integer" + }, + "permission_overwrites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + }, + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "allow", + "deny", + "id", + "type" + ] + } + }, + "parent_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "rtc_region": { + "type": "string" + }, + "default_auto_archive_duration": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "UserPublic": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "accent_color": { + "type": "integer" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "bot": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "public_flags", + "username" + ] + }, + "PublicConnectedAccount": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "verified" + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "BulkDeleteSchema": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "messages" + ], + "definitions": { + "Embed": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "type": { + "enum": [ + "article", + "gifv", + "image", + "link", + "rich", + "video" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "url": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "color": { + "type": "integer" + }, + "footer": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "text" + ] + }, + "image": { + "$ref": "#/definitions/EmbedImage" + }, + "thumbnail": { + "$ref": "#/definitions/EmbedImage" + }, + "video": { + "$ref": "#/definitions/EmbedImage" + }, + "provider": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inline": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "value" + ] + } + } + }, + "additionalProperties": false + }, + "EmbedImage": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "proxy_url": { + "type": "string" + }, + "height": { + "type": "integer" + }, + "width": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "Record": { + "type": "object", + "additionalProperties": false + }, + "ChannelPermissionOverwriteType": { + "enum": [ + 0, + 1, + 2 + ], + "type": "number" + }, + "ChannelModifySchema": { + "type": "object", + "properties": { + "name": { + "maxLength": 100, + "type": "string" + }, + "type": { + "enum": [ + 0, + 1, + 10, + 11, + 12, + 13, + 14, + 15, + 2, + 255, + 3, + 33, + 34, + 35, + 4, + 5, + 6, + 64, + 7, + 8, + 9 + ], + "type": "number" + }, + "topic": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "bitrate": { + "type": "integer" + }, + "user_limit": { + "type": "integer" + }, + "rate_limit_per_user": { + "type": "integer" + }, + "position": { + "type": "integer" + }, + "permission_overwrites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + }, + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "allow", + "deny", + "id", + "type" + ] + } + }, + "parent_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "rtc_region": { + "type": "string" + }, + "default_auto_archive_duration": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "UserPublic": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "accent_color": { + "type": "integer" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "bot": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "public_flags", + "username" + ] + }, + "PublicConnectedAccount": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "verified" + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ChannelPermissionOverwriteSchema": { + "type": "object", + "properties": { + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + } + }, + "additionalProperties": false, + "required": [ + "allow", + "deny", + "id", + "type" + ], + "definitions": { + "Embed": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "type": { + "enum": [ + "article", + "gifv", + "image", + "link", + "rich", + "video" + ], + "type": "string" + }, + "description": { + "type": "string" + }, + "url": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "color": { + "type": "integer" + }, + "footer": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "text" + ] + }, + "image": { + "$ref": "#/definitions/EmbedImage" + }, + "thumbnail": { + "$ref": "#/definitions/EmbedImage" + }, + "video": { + "$ref": "#/definitions/EmbedImage" + }, + "provider": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inline": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "value" + ] + } + } + }, + "additionalProperties": false + }, + "EmbedImage": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "proxy_url": { + "type": "string" + }, + "height": { + "type": "integer" + }, + "width": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "Record": { + "type": "object", + "additionalProperties": false + }, + "ChannelPermissionOverwriteType": { + "enum": [ + 0, + 1, + 2 + ], + "type": "number" + }, + "ChannelModifySchema": { + "type": "object", + "properties": { + "name": { + "maxLength": 100, + "type": "string" + }, + "type": { + "enum": [ + 0, + 1, + 10, + 11, + 12, + 13, + 14, + 15, + 2, + 255, + 3, + 33, + 34, + 35, + 4, + 5, + 6, + 64, + 7, + 8, + 9 + ], + "type": "number" + }, + "topic": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "bitrate": { + "type": "integer" + }, + "user_limit": { + "type": "integer" + }, + "rate_limit_per_user": { + "type": "integer" + }, + "position": { + "type": "integer" + }, + "permission_overwrites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + }, + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "allow", + "deny", + "id", + "type" + ] + } + }, + "parent_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "rtc_region": { + "type": "string" + }, + "default_auto_archive_duration": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "UserPublic": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "accent_color": { + "type": "integer" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "bot": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "public_flags", + "username" + ] + }, + "PublicConnectedAccount": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "verified" + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PurgeSchema": { + "type": "object", + "properties": { + "before": { + "type": "string" + }, + "after": { + "type": "string" } }, "additionalProperties": false, + "required": [ + "after", + "before" + ], "definitions": { "Embed": { "type": "object", @@ -2498,19 +3821,21 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "BulkDeleteSchema": { + "WebhookCreateSchema": { "type": "object", "properties": { - "messages": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "maxLength": 80, + "type": "string" + }, + "avatar": { + "type": "string" } }, "additionalProperties": false, "required": [ - "messages" + "avatar", + "name" ], "definitions": { "Embed": { @@ -2823,28 +4148,45 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "ChannelPermissionOverwriteSchema": { + "GatewayBotResponse": { "type": "object", "properties": { - "allow": { - "type": "string" - }, - "deny": { + "url": { "type": "string" }, - "id": { - "type": "string" + "shards": { + "type": "integer" }, - "type": { - "$ref": "#/definitions/ChannelPermissionOverwriteType" + "session_start_limit": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset_after": { + "type": "integer" + }, + "max_concurrency": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "max_concurrency", + "remaining", + "reset_after", + "total" + ] } }, "additionalProperties": false, "required": [ - "allow", - "deny", - "id", - "type" + "session_start_limit", + "shards", + "url" ], "definitions": { "Embed": { @@ -3157,20 +4499,16 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "PurgeSchema": { + "GatewayResponse": { "type": "object", "properties": { - "before": { - "type": "string" - }, - "after": { + "url": { "type": "string" } }, "additionalProperties": false, "required": [ - "after", - "before" + "url" ], "definitions": { "Embed": { @@ -3483,22 +4821,17 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "WebhookCreateSchema": { + "BanCreateSchema": { "type": "object", "properties": { - "name": { - "maxLength": 80, + "delete_message_days": { "type": "string" }, - "avatar": { + "reason": { "type": "string" } }, "additionalProperties": false, - "required": [ - "avatar", - "name" - ], "definitions": { "Embed": { "type": "object", @@ -3810,45 +5143,34 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GatewayBotResponse": { + "BanRegistrySchema": { "type": "object", "properties": { - "url": { + "id": { "type": "string" }, - "shards": { - "type": "integer" + "user_id": { + "type": "string" }, - "session_start_limit": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "remaining": { - "type": "integer" - }, - "reset_after": { - "type": "integer" - }, - "max_concurrency": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max_concurrency", - "remaining", - "reset_after", - "total" - ] + "guild_id": { + "type": "string" + }, + "executor_id": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "reason": { + "type": "string" } }, "additionalProperties": false, "required": [ - "session_start_limit", - "shards", - "url" + "executor_id", + "guild_id", + "id", + "user_id" ], "definitions": { "Embed": { @@ -4161,16 +5483,31 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GatewayResponse": { + "BanModeratorSchema": { "type": "object", "properties": { - "url": { + "id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "executor_id": { + "type": "string" + }, + "reason": { "type": "string" } }, "additionalProperties": false, "required": [ - "url" + "executor_id", + "guild_id", + "id", + "user_id" ], "definitions": { "Embed": { @@ -4483,17 +5820,29 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "BanCreateSchema": { - "type": "object", - "properties": { - "delete_message_days": { - "type": "string" + "ChannelReorderSchema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "lock_permissions": { + "type": "boolean" + }, + "parent_id": { + "type": "string" + } }, - "reason": { - "type": "string" - } + "additionalProperties": false, + "required": [ + "id" + ] }, - "additionalProperties": false, "definitions": { "Embed": { "type": "object", @@ -4805,34 +6154,31 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "BanRegistrySchema": { + "EmojiCreateSchema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "user_id": { - "type": "string" - }, - "guild_id": { + "name": { "type": "string" }, - "executor_id": { + "image": { "type": "string" }, - "ip": { - "type": "string" + "require_colons": { + "type": [ + "null", + "boolean" + ] }, - "reason": { - "type": "string" + "roles": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "executor_id", - "guild_id", - "id", - "user_id" + "image" ], "definitions": { "Embed": { @@ -5145,32 +6491,20 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "BanModeratorSchema": { + "EmojiModifySchema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "user_id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "executor_id": { + "name": { "type": "string" }, - "reason": { - "type": "string" + "roles": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, - "required": [ - "executor_id", - "guild_id", - "id", - "user_id" - ], "definitions": { "Embed": { "type": "object", @@ -5478,33 +6812,46 @@ "type", "verified" ] - } - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ChannelReorderSchema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "lock_permissions": { - "type": "boolean" - }, - "parent_id": { - "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildCreateSchema": { + "type": "object", + "properties": { + "name": { + "maxLength": 100, + "type": "string" + }, + "region": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "channels": { + "type": "array", + "items": { + "$ref": "#/definitions/ChannelModifySchema" } }, - "additionalProperties": false, - "required": [ - "id" - ] + "guild_template_code": { + "type": "string" + }, + "system_channel_id": { + "type": "string" + }, + "rules_channel_id": { + "type": "string" + } }, + "additionalProperties": false, + "required": [ + "name" + ], "definitions": { "Embed": { "type": "object", @@ -5816,31 +7163,80 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmojiCreateSchema": { + "GuildUpdateSchema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "image": { - "type": "string" + "banner": { + "type": [ + "null", + "string" + ] }, - "require_colons": { + "splash": { "type": [ "null", - "boolean" + "string" ] }, - "roles": { + "description": { + "type": "string" + }, + "features": { "type": "array", "items": { "type": "string" } + }, + "verification_level": { + "type": "integer" + }, + "default_message_notifications": { + "type": "integer" + }, + "system_channel_flags": { + "type": "integer" + }, + "explicit_content_filter": { + "type": "integer" + }, + "public_updates_channel_id": { + "type": "string" + }, + "afk_timeout": { + "type": "integer" + }, + "afk_channel_id": { + "type": "string" + }, + "preferred_locale": { + "type": "string" + }, + "name": { + "maxLength": 100, + "type": "string" + }, + "region": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "guild_template_code": { + "type": "string" + }, + "system_channel_id": { + "type": "string" + }, + "rules_channel_id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "image" + "name" ], "definitions": { "Embed": { @@ -6153,12 +7549,9 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmojiModifySchema": { + "MemberChangeSchema": { "type": "object", "properties": { - "name": { - "type": "string" - }, "roles": { "type": "array", "items": { @@ -6478,41 +7871,16 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildCreateSchema": { + "MemberNickChangeSchema": { "type": "object", "properties": { - "name": { - "maxLength": 100, - "type": "string" - }, - "region": { - "type": "string" - }, - "icon": { - "type": [ - "null", - "string" - ] - }, - "channels": { - "type": "array", - "items": { - "$ref": "#/definitions/ChannelModifySchema" - } - }, - "guild_template_code": { - "type": "string" - }, - "system_channel_id": { - "type": "string" - }, - "rules_channel_id": { + "nick": { "type": "string" } }, "additionalProperties": false, "required": [ - "name" + "nick" ], "definitions": { "Embed": { @@ -6779,126 +8147,62 @@ }, "banner": { "type": "string" - }, - "bio": { - "type": "string" - }, - "bot": { - "type": "boolean" - }, - "premium_since": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "bio", - "bot", - "discriminator", - "id", - "premium_since", - "public_flags", - "username" - ] - }, - "PublicConnectedAccount": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "verified": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "verified" - ] - } - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildUpdateSchema": { - "type": "object", - "properties": { - "banner": { - "type": [ - "null", - "string" - ] - }, - "splash": { - "type": [ - "null", - "string" - ] - }, - "description": { - "type": "string" - }, - "features": { - "type": "array", - "items": { - "type": "string" - } - }, - "verification_level": { - "type": "integer" - }, - "default_message_notifications": { - "type": "integer" - }, - "system_channel_flags": { - "type": "integer" - }, - "explicit_content_filter": { - "type": "integer" - }, - "public_updates_channel_id": { - "type": "string" - }, - "afk_timeout": { - "type": "integer" - }, - "afk_channel_id": { - "type": "string" - }, - "preferred_locale": { - "type": "string" - }, - "name": { - "maxLength": 100, - "type": "string" - }, - "region": { - "type": "string" - }, - "icon": { - "type": [ - "null", - "string" + }, + "bio": { + "type": "string" + }, + "bot": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "public_flags", + "username" ] }, - "guild_template_code": { - "type": "string" - }, - "system_channel_id": { - "type": "string" - }, - "rules_channel_id": { - "type": "string" + "PublicConnectedAccount": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "verified" + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PruneSchema": { + "type": "object", + "properties": { + "days": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "name" + "days" ], "definitions": { "Embed": { @@ -7211,14 +8515,32 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "MemberChangeSchema": { + "RoleModifySchema": { "type": "object", "properties": { - "roles": { - "type": "array", - "items": { - "type": "string" - } + "name": { + "type": "string" + }, + "permissions": { + "type": "string" + }, + "color": { + "type": "integer" + }, + "hoist": { + "type": "boolean" + }, + "mentionable": { + "type": "boolean" + }, + "position": { + "type": "integer" + }, + "icon": { + "type": "string" + }, + "unicode_emoji": { + "type": "string" } }, "additionalProperties": false, @@ -7533,17 +8855,24 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "MemberNickChangeSchema": { - "type": "object", - "properties": { - "nick": { - "type": "string" - } + "RolePositionUpdateSchema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "position": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "id", + "position" + ] }, - "additionalProperties": false, - "required": [ - "nick" - ], "definitions": { "Embed": { "type": "object", @@ -7855,16 +9184,27 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "PruneSchema": { + "ModifyGuildStickerSchema": { "type": "object", "properties": { - "days": { - "type": "integer" + "name": { + "minLength": 2, + "maxLength": 30, + "type": "string" + }, + "description": { + "maxLength": 100, + "type": "string" + }, + "tags": { + "maxLength": 200, + "type": "string" } }, "additionalProperties": false, "required": [ - "days" + "name", + "tags" ], "definitions": { "Embed": { @@ -8177,35 +9517,20 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "RoleModifySchema": { + "TemplateCreateSchema": { "type": "object", "properties": { "name": { "type": "string" }, - "permissions": { - "type": "string" - }, - "color": { - "type": "integer" - }, - "hoist": { - "type": "boolean" - }, - "mentionable": { - "type": "boolean" - }, - "position": { - "type": "integer" - }, - "icon": { - "type": "string" - }, - "unicode_emoji": { + "description": { "type": "string" } }, "additionalProperties": false, + "required": [ + "name" + ], "definitions": { "Embed": { "type": "object", @@ -8517,24 +9842,20 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "RolePositionUpdateSchema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "position": { - "type": "integer" - } + "TemplateModifySchema": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - "additionalProperties": false, - "required": [ - "id", - "position" - ] + "description": { + "type": "string" + } }, + "additionalProperties": false, + "required": [ + "name" + ], "definitions": { "Embed": { "type": "object", @@ -8846,28 +10167,16 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "ModifyGuildStickerSchema": { + "VanityUrlSchema": { "type": "object", "properties": { - "name": { - "minLength": 2, - "maxLength": 30, - "type": "string" - }, - "description": { - "maxLength": 100, - "type": "string" - }, - "tags": { - "maxLength": 200, + "code": { + "minLength": 1, + "maxLength": 20, "type": "string" } }, "additionalProperties": false, - "required": [ - "name", - "tags" - ], "definitions": { "Embed": { "type": "object", @@ -9179,19 +10488,35 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "TemplateCreateSchema": { + "VoiceStateUpdateSchema": { "type": "object", "properties": { - "name": { + "channel_id": { "type": "string" }, - "description": { + "guild_id": { "type": "string" + }, + "suppress": { + "type": "boolean" + }, + "request_to_speak_timestamp": { + "type": "string", + "format": "date-time" + }, + "self_mute": { + "type": "boolean" + }, + "self_deaf": { + "type": "boolean" + }, + "self_video": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "name" + "channel_id" ], "definitions": { "Embed": { @@ -9504,20 +10829,43 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "TemplateModifySchema": { + "GuildUpdateWelcomeScreenSchema": { "type": "object", "properties": { - "name": { - "type": "string" + "welcome_channels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel_id", + "description", + "emoji_name" + ] + } + }, + "enabled": { + "type": "boolean" }, "description": { "type": "string" } }, "additionalProperties": false, - "required": [ - "name" - ], "definitions": { "Embed": { "type": "object", @@ -9829,16 +11177,21 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "VanityUrlSchema": { + "WidgetModifySchema": { "type": "object", "properties": { - "code": { - "minLength": 1, - "maxLength": 20, + "enabled": { + "type": "boolean" + }, + "channel_id": { "type": "string" } }, "additionalProperties": false, + "required": [ + "channel_id", + "enabled" + ], "definitions": { "Embed": { "type": "object", @@ -10150,35 +11503,22 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "VoiceStateUpdateSchema": { + "GuildTemplateCreateSchema": { "type": "object", "properties": { - "channel_id": { - "type": "string" - }, - "guild_id": { + "name": { "type": "string" }, - "suppress": { - "type": "boolean" - }, - "request_to_speak_timestamp": { - "type": "string", - "format": "date-time" - }, - "self_mute": { - "type": "boolean" - }, - "self_deaf": { - "type": "boolean" - }, - "self_video": { - "type": "boolean" + "avatar": { + "type": [ + "null", + "string" + ] } }, "additionalProperties": false, "required": [ - "channel_id" + "name" ], "definitions": { "Embed": { @@ -10491,43 +11831,29 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildUpdateWelcomeScreenSchema": { + "UserProfileResponse": { "type": "object", "properties": { - "welcome_channels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "channel_id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "emoji_id": { - "type": "string" - }, - "emoji_name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "channel_id", - "description", - "emoji_name" - ] - } + "user": { + "$ref": "#/definitions/UserPublic" }, - "enabled": { - "type": "boolean" + "connected_accounts": { + "$ref": "#/definitions/PublicConnectedAccount" }, - "description": { - "type": "string" + "premium_guild_since": { + "type": "string", + "format": "date-time" + }, + "premium_since": { + "type": "string", + "format": "date-time" } }, "additionalProperties": false, + "required": [ + "connected_accounts", + "user" + ], "definitions": { "Embed": { "type": "object", @@ -10839,20 +12165,34 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "WidgetModifySchema": { + "UserRelationsResponse": { "type": "object", "properties": { - "enabled": { - "type": "boolean" - }, - "channel_id": { - "type": "string" + "object": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + } + }, + "additionalProperties": false } }, "additionalProperties": false, "required": [ - "channel_id", - "enabled" + "object" ], "definitions": { "Embed": { @@ -11165,22 +12505,22 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildTemplateCreateSchema": { + "DmChannelCreateSchema": { "type": "object", "properties": { "name": { "type": "string" }, - "avatar": { - "type": [ - "null", - "string" - ] + "recipients": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "name" + "recipients" ], "definitions": { "Embed": { @@ -11493,29 +12833,44 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserProfileResponse": { + "UserModifySchema": { "type": "object", "properties": { - "user": { - "$ref": "#/definitions/UserPublic" + "username": { + "minLength": 1, + "maxLength": 100, + "type": "string" }, - "connected_accounts": { - "$ref": "#/definitions/PublicConnectedAccount" + "avatar": { + "type": [ + "null", + "string" + ] }, - "premium_guild_since": { - "type": "string", - "format": "date-time" + "bio": { + "maxLength": 1024, + "type": "string" }, - "premium_since": { - "type": "string", - "format": "date-time" + "accent_color": { + "type": "integer" + }, + "banner": { + "type": [ + "null", + "string" + ] + }, + "password": { + "type": "string" + }, + "new_password": { + "type": "string" + }, + "code": { + "type": "string" } }, "additionalProperties": false, - "required": [ - "connected_accounts", - "user" - ], "definitions": { "Embed": { "type": "object", @@ -11827,34 +13182,19 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserRelationsResponse": { + "MfaCodesSchema": { "type": "object", "properties": { - "object": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "public_flags": { - "type": "integer" - } - }, - "additionalProperties": false + "password": { + "type": "string" + }, + "regenerate": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "object" + "password" ], "definitions": { "Embed": { @@ -12167,22 +13507,16 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "DmChannelCreateSchema": { + "TotpDisableSchema": { "type": "object", "properties": { - "name": { + "code": { "type": "string" - }, - "recipients": { - "type": "array", - "items": { - "type": "string" - } } }, "additionalProperties": false, "required": [ - "recipients" + "code" ], "definitions": { "Embed": { @@ -12495,44 +13829,23 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserModifySchema": { + "TotpEnableSchema": { "type": "object", "properties": { - "username": { - "minLength": 1, - "maxLength": 100, - "type": "string" - }, - "avatar": { - "type": [ - "null", - "string" - ] - }, - "bio": { - "maxLength": 1024, - "type": "string" - }, - "accent_color": { - "type": "integer" - }, - "banner": { - "type": [ - "null", - "string" - ] - }, "password": { "type": "string" }, - "new_password": { + "code": { "type": "string" }, - "code": { + "secret": { "type": "string" } }, "additionalProperties": false, + "required": [ + "password" + ], "definitions": { "Embed": { "type": "object", diff --git a/api/locales/en/auth.json b/api/locales/en/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/en/auth.json +++ b/api/locales/en/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", diff --git a/api/src/middlewares/Authentication.ts b/api/src/middlewares/Authentication.ts index 5a08caf3..1df7911b 100644 --- a/api/src/middlewares/Authentication.ts +++ b/api/src/middlewares/Authentication.ts @@ -7,6 +7,7 @@ export const NO_AUTHORIZATION_ROUTES = [ "/auth/login", "/auth/register", "/auth/location-metadata", + "/auth/mfa/totp", // Routes with a seperate auth system "/webhooks/", // Public information endpoints diff --git a/api/src/routes/auth/login.ts b/api/src/routes/auth/login.ts index a89721ea..5df9e252 100644 --- a/api/src/routes/auth/login.ts +++ b/api/src/routes/auth/login.ts @@ -2,6 +2,7 @@ import { Request, Response, Router } from "express"; import { route } from "@fosscord/api"; import bcrypt from "bcrypt"; import { Config, User, generateToken, adjustEmail, FieldErrors } from "@fosscord/util"; +import crypto from "crypto"; const router: Router = Router(); export default router; @@ -37,7 +38,7 @@ router.post("/", route({ body: "LoginSchema" }), async (req: Request, res: Respo const user = await User.findOneOrFail({ where: [{ phone: login }, { email: login }], - select: ["data", "id", "disabled", "deleted", "settings"] + select: ["data", "id", "disabled", "deleted", "settings", "totp_secret", "mfa_enabled"] }).catch((e) => { throw FieldErrors({ login: { message: req.t("auth:login.INVALID_LOGIN"), code: "INVALID_LOGIN" } }); }); @@ -57,6 +58,20 @@ router.post("/", route({ body: "LoginSchema" }), async (req: Request, res: Respo throw FieldErrors({ password: { message: req.t("auth:login.INVALID_PASSWORD"), code: "INVALID_PASSWORD" } }); } + if (user.mfa_enabled) { + // TODO: This is not a discord.com ticket. I'm not sure what it is but I'm lazy + const ticket = crypto.randomBytes(40).toString("hex"); + + await User.update({ id: user.id }, { totp_last_ticket: ticket }); + + return res.json({ + ticket: ticket, + mfa: true, + sms: false, // TODO + token: null, + }) + } + const token = await generateToken(user.id); // Notice this will have a different token structure, than discord diff --git a/api/src/routes/auth/mfa/totp.ts b/api/src/routes/auth/mfa/totp.ts new file mode 100644 index 00000000..cec6e5ee --- /dev/null +++ b/api/src/routes/auth/mfa/totp.ts @@ -0,0 +1,49 @@ +import { Router, Request, Response } from "express"; +import { route } from "@fosscord/api"; +import { BackupCode, FieldErrors, generateToken, User } from "@fosscord/util"; +import { verifyToken } from "node-2fa"; +import { HTTPError } from "lambert-server"; +const router = Router(); + +export interface TotpSchema { + code: string, + ticket: string, + gift_code_sku_id?: string | null, + login_source?: string | null, +} + +router.post("/", route({ body: "TotpSchema" }), async (req: Request, res: Response) => { + const { code, ticket, gift_code_sku_id, login_source } = req.body as TotpSchema; + + const user = await User.findOneOrFail({ + where: { + totp_last_ticket: ticket, + }, + select: [ + "id", + "totp_secret", + "settings", + ], + }); + + const backup = await BackupCode.findOne({ code: code, expired: false, consumed: false, user: { id: user.id }}); + + if (!backup) { + const ret = verifyToken(user.totp_secret!, code); + if (!ret || ret.delta != 0) + throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); + } + else { + backup.consumed = true; + await backup.save(); + } + + await User.update({ id: user.id }, { totp_last_ticket: "" }); + + return res.json({ + token: await generateToken(user.id), + user_settings: user.settings, + }); +}); + +export default router; diff --git a/api/src/routes/users/@me/mfa/codes.ts b/api/src/routes/users/@me/mfa/codes.ts new file mode 100644 index 00000000..2a1fb498 --- /dev/null +++ b/api/src/routes/users/@me/mfa/codes.ts @@ -0,0 +1,48 @@ +import { Router, Request, Response } from "express"; +import { route } from "@fosscord/api"; +import { BackupCode, FieldErrors, generateMfaBackupCodes, User } from "@fosscord/util"; +import bcrypt from "bcrypt"; + +const router = Router(); + +export interface MfaCodesSchema { + password: string; + regenerate?: boolean; +} + +// TODO: This route is replaced with users/@me/mfa/codes-verification in newer clients + +router.post("/", route({ body: "MfaCodesSchema" }), async (req: Request, res: Response) => { + const { password, regenerate } = req.body as MfaCodesSchema; + + const user = await User.findOneOrFail({ id: req.user_id }, { select: ["data"] }); + + if (!await bcrypt.compare(password, user.data.hash || "")) { + throw FieldErrors({ password: { message: req.t("auth:login.INVALID_PASSWORD"), code: "INVALID_PASSWORD" } }); + } + + var codes: BackupCode[]; + if (regenerate) { + await BackupCode.update( + { user: { id: req.user_id } }, + { expired: true } + ); + + codes = generateMfaBackupCodes(req.user_id); + await Promise.all(codes.map(x => x.save())); + } + else { + codes = await BackupCode.find({ + user: { + id: req.user_id, + }, + expired: false, + }); + } + + return res.json({ + backup_codes: codes.map(x => ({ ...x, expired: undefined })), + }) +}); + +export default router; diff --git a/api/src/routes/users/@me/mfa/totp/disable.ts b/api/src/routes/users/@me/mfa/totp/disable.ts new file mode 100644 index 00000000..5e039ea3 --- /dev/null +++ b/api/src/routes/users/@me/mfa/totp/disable.ts @@ -0,0 +1,45 @@ +import { Router, Request, Response } from "express"; +import { route } from "@fosscord/api"; +import { verifyToken } from 'node-2fa'; +import { HTTPError } from "lambert-server"; +import { User, generateToken, BackupCode } from "@fosscord/util"; + +const router = Router(); + +export interface TotpDisableSchema { + code: string; +} + +router.post("/", route({ body: "TotpDisableSchema" }), async (req: Request, res: Response) => { + const body = req.body as TotpDisableSchema; + + const user = await User.findOneOrFail({ id: req.user_id }, { select: ["totp_secret"] }); + + const backup = await BackupCode.findOne({ code: body.code }); + if (!backup) { + const ret = verifyToken(user.totp_secret!, body.code); + if (!ret || ret.delta != 0) + throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); + } + + await User.update( + { id: req.user_id }, + { + mfa_enabled: false, + totp_secret: "", + }, + ); + + await BackupCode.update( + { user: { id: req.user_id } }, + { + expired: true, + } + ); + + return res.json({ + token: await generateToken(user.id), + }); +}); + +export default router; \ No newline at end of file diff --git a/api/src/routes/users/@me/mfa/totp/enable.ts b/api/src/routes/users/@me/mfa/totp/enable.ts new file mode 100644 index 00000000..bc5f16ad --- /dev/null +++ b/api/src/routes/users/@me/mfa/totp/enable.ts @@ -0,0 +1,51 @@ +import { Router, Request, Response } from "express"; +import { User, generateToken, BackupCode, generateMfaBackupCodes } from "@fosscord/util"; +import { route } from "@fosscord/api"; +import bcrypt from "bcrypt"; +import { HTTPError } from "lambert-server"; +import { verifyToken } from 'node-2fa'; +import crypto from "crypto"; + +const router = Router(); + +export interface TotpEnableSchema { + password: string; + code?: string; + secret?: string; +} + +router.post("/", route({ body: "TotpEnableSchema" }), async (req: Request, res: Response) => { + const body = req.body as TotpEnableSchema; + + const user = await User.findOneOrFail({ where: { id: req.user_id }, select: ["data"] }); + + // TODO: Are guests allowed to enable 2fa? + if (user.data.hash) { + if (!await bcrypt.compare(body.password, user.data.hash)) { + throw new HTTPError(req.t("auth:login.INVALID_PASSWORD")); + } + } + + if (!body.secret) + throw new HTTPError(req.t("auth:login.INVALID_TOTP_SECRET"), 60005); + + if (!body.code) + throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); + + if (verifyToken(body.secret, body.code)?.delta != 0) + throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); + + let backup_codes = generateMfaBackupCodes(req.user_id); + await Promise.all(backup_codes.map(x => x.save())); + await User.update( + { id: req.user_id }, + { mfa_enabled: true, totp_secret: body.secret } + ); + + res.send({ + token: await generateToken(user.id), + backup_codes: backup_codes.map(x => ({ ...x, expired: undefined })), + }); +}); + +export default router; \ No newline at end of file diff --git a/util/src/entities/BackupCodes.ts b/util/src/entities/BackupCodes.ts new file mode 100644 index 00000000..d532a39a --- /dev/null +++ b/util/src/entities/BackupCodes.ts @@ -0,0 +1,35 @@ +import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { User } from "./User"; +import crypto from "crypto"; + +@Entity("backup_codes") +export class BackupCode extends BaseClass { + @JoinColumn({ name: "user_id" }) + @ManyToOne(() => User, { onDelete: "CASCADE" }) + user: User; + + @Column() + code: string; + + @Column() + consumed: boolean; + + @Column() + expired: boolean; +} + +export function generateMfaBackupCodes(user_id: string) { + let backup_codes: BackupCode[] = []; + for (let i = 0; i < 10; i++) { + const code = BackupCode.create({ + user: { id: user_id }, + code: crypto.randomBytes(4).toString("hex"), // 8 characters + consumed: false, + expired: false, + }); + backup_codes.push(code); + } + + return backup_codes; +} \ No newline at end of file diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts index 9b1c494e..79d415ca 100644 --- a/util/src/entities/User.ts +++ b/util/src/entities/User.ts @@ -1,4 +1,4 @@ -import { Column, Entity, FindOneOptions, JoinColumn, ManyToMany, OneToMany, RelationId } from "typeorm"; +import { Column, Entity, FindOneOptions, JoinColumn, OneToMany } from "typeorm"; import { BaseClass } from "./BaseClass"; import { BitField } from "../util/BitField"; import { Relationship } from "./Relationship"; @@ -108,6 +108,12 @@ export class User extends BaseClass { @Column({ select: false }) mfa_enabled: boolean; // if multi factor authentication is enabled + @Column({ select: false, nullable: true }) + totp_secret?: string; + + @Column({ nullable: true, select: false }) + totp_last_ticket?: string; + @Column() created_at: Date; // registration date diff --git a/util/src/entities/index.ts b/util/src/entities/index.ts index f023d5a6..1b6259ae 100644 --- a/util/src/entities/index.ts +++ b/util/src/entities/index.ts @@ -27,4 +27,5 @@ export * from "./Template"; export * from "./User"; export * from "./VoiceState"; export * from "./Webhook"; -export * from "./ClientRelease"; \ No newline at end of file +export * from "./ClientRelease"; +export * from "./BackupCodes"; \ No newline at end of file -- cgit 1.5.1 From 4fa8b16b4a3e8ebde531088e5a3380b423ae1043 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Wed, 20 Jul 2022 21:17:19 +1000 Subject: Add node-2fa to package.json --- api/package.json | 1 + bundle/package.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/package.json b/api/package.json index 1bb49261..07208d60 100644 --- a/api/package.json +++ b/api/package.json @@ -86,6 +86,7 @@ "missing-native-js-functions": "^1.2.18", "morgan": "^1.10.0", "multer": "^1.4.2", + "node-2fa": "^2.0.3", "node-fetch": "^2.6.2", "patch-package": "^6.4.7", "picocolors": "^1.0.0", diff --git a/bundle/package.json b/bundle/package.json index c050a302..86e300e1 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -109,6 +109,7 @@ "typescript": "^4.1.2", "typescript-cached-transpile": "^0.0.6", "typescript-json-schema": "^0.50.1", - "ws": "^7.4.2" + "ws": "^7.4.2", + "node-2fa": "^2.0.3" } -} +} \ No newline at end of file -- cgit 1.5.1 From eb7f2c7b72f545b99949e4290bc38cb448903141 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Wed, 20 Jul 2022 22:04:19 +1000 Subject: Add config `security_twoFactor_generateBackupCodes` to control backup code generation --- api/src/routes/users/@me/mfa/codes.ts | 4 ++-- api/src/routes/users/@me/mfa/totp/enable.ts | 11 +++++++---- util/src/entities/Config.ts | 6 ++++++ 3 files changed, 15 insertions(+), 6 deletions(-) (limited to 'api') diff --git a/api/src/routes/users/@me/mfa/codes.ts b/api/src/routes/users/@me/mfa/codes.ts index 2a1fb498..6ddf32f0 100644 --- a/api/src/routes/users/@me/mfa/codes.ts +++ b/api/src/routes/users/@me/mfa/codes.ts @@ -1,6 +1,6 @@ import { Router, Request, Response } from "express"; import { route } from "@fosscord/api"; -import { BackupCode, FieldErrors, generateMfaBackupCodes, User } from "@fosscord/util"; +import { BackupCode, Config, FieldErrors, generateMfaBackupCodes, User } from "@fosscord/util"; import bcrypt from "bcrypt"; const router = Router(); @@ -22,7 +22,7 @@ router.post("/", route({ body: "MfaCodesSchema" }), async (req: Request, res: Re } var codes: BackupCode[]; - if (regenerate) { + if (regenerate && Config.get().security.twoFactor.generateBackupCodes) { await BackupCode.update( { user: { id: req.user_id } }, { expired: true } diff --git a/api/src/routes/users/@me/mfa/totp/enable.ts b/api/src/routes/users/@me/mfa/totp/enable.ts index bc5f16ad..87f36d55 100644 --- a/api/src/routes/users/@me/mfa/totp/enable.ts +++ b/api/src/routes/users/@me/mfa/totp/enable.ts @@ -1,10 +1,9 @@ import { Router, Request, Response } from "express"; -import { User, generateToken, BackupCode, generateMfaBackupCodes } from "@fosscord/util"; +import { User, generateToken, BackupCode, generateMfaBackupCodes, Config } from "@fosscord/util"; import { route } from "@fosscord/api"; import bcrypt from "bcrypt"; import { HTTPError } from "lambert-server"; import { verifyToken } from 'node-2fa'; -import crypto from "crypto"; const router = Router(); @@ -35,8 +34,12 @@ router.post("/", route({ body: "TotpEnableSchema" }), async (req: Request, res: if (verifyToken(body.secret, body.code)?.delta != 0) throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); - let backup_codes = generateMfaBackupCodes(req.user_id); - await Promise.all(backup_codes.map(x => x.save())); + let backup_codes: BackupCode[] = []; + if (Config.get().security.twoFactor.generateBackupCodes) { + backup_codes = generateMfaBackupCodes(req.user_id); + await Promise.all(backup_codes.map(x => x.save())); + } + await User.update( { id: req.user_id }, { mfa_enabled: true, totp_secret: body.secret } diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts index 3756d686..c84ea4aa 100644 --- a/util/src/entities/Config.ts +++ b/util/src/entities/Config.ts @@ -121,6 +121,9 @@ export interface ConfigValue { secret: string | null; }; ipdataApiKey: string | null; + twoFactor: { + generateBackupCodes: boolean; + }; }; login: { requireCaptcha: boolean; @@ -312,6 +315,9 @@ export const DefaultConfigOptions: ConfigValue = { secret: null, }, ipdataApiKey: "eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9", + twoFactor: { + generateBackupCodes: true, + }, }, login: { requireCaptcha: false, -- cgit 1.5.1 From c73dbe9c5bffea1960cd1a113e62e6c69def386c Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 23 Jul 2022 20:52:48 +1000 Subject: Moved user notes into separate table --- api/src/routes/users/@me/notes.ts | 39 ++++++++++++++++++++++++++++----------- util/src/entities/Note.ts | 18 ++++++++++++++++++ util/src/entities/User.ts | 4 +--- util/src/entities/index.ts | 3 ++- 4 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 util/src/entities/Note.ts (limited to 'api') diff --git a/api/src/routes/users/@me/notes.ts b/api/src/routes/users/@me/notes.ts index 4887b191..e3406d18 100644 --- a/api/src/routes/users/@me/notes.ts +++ b/api/src/routes/users/@me/notes.ts @@ -1,37 +1,54 @@ import { Request, Response, Router } from "express"; import { route } from "@fosscord/api"; -import { User, emitEvent } from "@fosscord/util"; +import { User, Note, emitEvent, Snowflake } from "@fosscord/util"; const router: Router = Router(); router.get("/:id", route({}), async (req: Request, res: Response) => { const { id } = req.params; - const user = await User.findOneOrFail({ where: { id: req.user_id }, select: ["notes"] }); - const note = user.notes[id]; + const note = await Note.findOneOrFail({ + where: { + owner: { id: req.user_id }, + target: { id: id }, + } + }); + return res.json({ - note: note, + note: note?.content, note_user_id: id, - user_id: user.id, + user_id: req.user_id, }); }); router.put("/:id", route({}), async (req: Request, res: Response) => { const { id } = req.params; - const user = await User.findOneOrFail({ where: { id: req.user_id } }); - const noteUser = await User.findOneOrFail({ where: { id: id }}); //if noted user does not exist throw + const owner = await User.findOneOrFail({ where: { id: req.user_id } }); + const target = await User.findOneOrFail({ where: { id: id } }); //if noted user does not exist throw const { note } = req.body; - await User.update({ id: req.user_id }, { notes: { ...user.notes, [noteUser.id]: note } }); + // await User.update({ id: req.user_id }, { notes: { ...user.notes, [noteUser.id]: note } }); + + if (await Note.findOne({ owner: { id: owner.id }, target: { id: target.id } })) { + Note.update( + { owner: { id: owner.id }, target: { id: target.id } }, + { owner, target, content: note } + ); + } + else { + Note.insert( + { id: Snowflake.generate(), owner, target, content: note } + ); + } await emitEvent({ event: "USER_NOTE_UPDATE", data: { note: note, - id: noteUser.id + id: target.id }, - user_id: user.id, - }) + user_id: owner.id, + }); return res.status(204); }); diff --git a/util/src/entities/Note.ts b/util/src/entities/Note.ts new file mode 100644 index 00000000..36017c5e --- /dev/null +++ b/util/src/entities/Note.ts @@ -0,0 +1,18 @@ +import { Column, Entity, JoinColumn, ManyToOne, Unique } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { User } from "./User"; + +@Entity("notes") +@Unique(["owner", "target"]) +export class Note extends BaseClass { + @JoinColumn({ name: "owner_id" }) + @ManyToOne(() => User, { onDelete: "CASCADE" }) + owner: User; + + @JoinColumn({ name: "target_id" }) + @ManyToOne(() => User, { onDelete: "CASCADE" }) + target: User; + + @Column() + content: string; +} \ No newline at end of file diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts index 9b1c494e..8deb7ed5 100644 --- a/util/src/entities/User.ts +++ b/util/src/entities/User.ts @@ -5,6 +5,7 @@ import { Relationship } from "./Relationship"; import { ConnectedAccount } from "./ConnectedAccount"; import { Config, FieldErrors, Snowflake, trimSpecial } from ".."; import { Member, Session } from "."; +import { Note } from "./Note"; export enum PublicUserEnum { username, @@ -168,9 +169,6 @@ export class User extends BaseClass { @Column({ type: "simple-json", select: false }) extended_settings: string; - @Column({ type: "simple-json" }) - notes: { [key: string]: string }; //key is ID of user - toPublicUser() { const user: any = {}; PublicUserProjection.forEach((x) => { diff --git a/util/src/entities/index.ts b/util/src/entities/index.ts index f023d5a6..cb087136 100644 --- a/util/src/entities/index.ts +++ b/util/src/entities/index.ts @@ -27,4 +27,5 @@ export * from "./Template"; export * from "./User"; export * from "./VoiceState"; export * from "./Webhook"; -export * from "./ClientRelease"; \ No newline at end of file +export * from "./ClientRelease"; +export * from "./Note"; \ No newline at end of file -- cgit 1.5.1 From 78acb2a013d109e6a5179f8a9fe28f23819c5f3d Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 23 Jul 2022 21:06:31 +1000 Subject: Delete Note if no content --- api/src/routes/users/@me/notes.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'api') diff --git a/api/src/routes/users/@me/notes.ts b/api/src/routes/users/@me/notes.ts index e3406d18..3c503942 100644 --- a/api/src/routes/users/@me/notes.ts +++ b/api/src/routes/users/@me/notes.ts @@ -27,18 +27,22 @@ router.put("/:id", route({}), async (req: Request, res: Response) => { const target = await User.findOneOrFail({ where: { id: id } }); //if noted user does not exist throw const { note } = req.body; - // await User.update({ id: req.user_id }, { notes: { ...user.notes, [noteUser.id]: note } }); - - if (await Note.findOne({ owner: { id: owner.id }, target: { id: target.id } })) { - Note.update( - { owner: { id: owner.id }, target: { id: target.id } }, - { owner, target, content: note } - ); + if (note && note.length) { + // upsert a note + if (await Note.findOne({ owner: { id: owner.id }, target: { id: target.id } })) { + Note.update( + { owner: { id: owner.id }, target: { id: target.id } }, + { owner, target, content: note } + ); + } + else { + Note.insert( + { id: Snowflake.generate(), owner, target, content: note } + ); + } } else { - Note.insert( - { id: Snowflake.generate(), owner, target, content: note } - ); + await Note.delete({ owner: { id: owner.id }, target: { id: target.id } }); } await emitEvent({ -- cgit 1.5.1 From 9ab01e040495b60d4f29217191d3ae9ee774608c Mon Sep 17 00:00:00 2001 From: Puyodead1 <23562356riley@gmail.com> Date: Mon, 25 Jul 2022 23:02:04 -0400 Subject: fix: not being able to enable community --- api/assets/schemas.json | 10 +++------- api/src/routes/guilds/#guild_id/index.ts | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'api') diff --git a/api/assets/schemas.json b/api/assets/schemas.json index 2102292b..ca42e676 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -6828,6 +6828,9 @@ "GuildUpdateSchema": { "type": "object", "properties": { + "name": { + "type": "string" + }, "banner": { "type": [ "null", @@ -6873,10 +6876,6 @@ "preferred_locale": { "type": "string" }, - "name": { - "maxLength": 100, - "type": "string" - }, "region": { "type": "string" }, @@ -6897,9 +6896,6 @@ } }, "additionalProperties": false, - "required": [ - "name" - ], "definitions": { "Embed": { "type": "object", diff --git a/api/src/routes/guilds/#guild_id/index.ts b/api/src/routes/guilds/#guild_id/index.ts index 4ec3df72..be556fb2 100644 --- a/api/src/routes/guilds/#guild_id/index.ts +++ b/api/src/routes/guilds/#guild_id/index.ts @@ -7,7 +7,8 @@ import { GuildCreateSchema } from "../index"; const router = Router(); -export interface GuildUpdateSchema extends Omit { +export interface GuildUpdateSchema extends Omit { + name?: string; banner?: string | null; splash?: string | null; description?: string; -- cgit 1.5.1 From f3b1e9b02641376177c4c358074e01f201ba0ff8 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Sat, 30 Jul 2022 14:33:01 -0400 Subject: add discriminator to user modify schema --- api/assets/schemas.json | 5 +++++ api/src/routes/users/@me/index.ts | 1 + 2 files changed, 6 insertions(+) (limited to 'api') diff --git a/api/assets/schemas.json b/api/assets/schemas.json index ca42e676..f7efb888 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -12499,6 +12499,11 @@ "maxLength": 100, "type": "string" }, + "discriminator": { + "minLength": 4, + "maxLength": 4, + "type": "string" + }, "avatar": { "type": [ "null", diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts index 1af413c4..7fc20457 100644 --- a/api/src/routes/users/@me/index.ts +++ b/api/src/routes/users/@me/index.ts @@ -11,6 +11,7 @@ export interface UserModifySchema { * @maxLength 100 */ username?: string; + discriminator?: string; avatar?: string | null; /** * @maxLength 1024 -- cgit 1.5.1 From 243417a66728c6494c5718b550ce2f677bba77a7 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Sat, 30 Jul 2022 17:34:14 -0400 Subject: Update schemas.json --- api/assets/schemas.json | 2 -- 1 file changed, 2 deletions(-) (limited to 'api') diff --git a/api/assets/schemas.json b/api/assets/schemas.json index f7efb888..9c312123 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -12500,8 +12500,6 @@ "type": "string" }, "discriminator": { - "minLength": 4, - "maxLength": 4, "type": "string" }, "avatar": { -- cgit 1.5.1 From 6e9bd98711f488dd06d2ce93027f8d9ea4cd3ad5 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 31 Jul 2022 13:27:15 +0200 Subject: Make requested changes (pr792) --- .gitignore | 2 ++ api/src/middlewares/TestClient.ts | 1 - api/src/util/entities/AssetCacheItem.ts | 15 +-------------- fosscord-server.code-workspace | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) (limited to 'api') diff --git a/.gitignore b/.gitignore index cc60b305..607b4f5a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ config.json .vscode/settings.json api/assets/plugins/*.js .idea/ +*.code-workspace + diff --git a/api/src/middlewares/TestClient.ts b/api/src/middlewares/TestClient.ts index e52a5e59..7292868c 100644 --- a/api/src/middlewares/TestClient.ts +++ b/api/src/middlewares/TestClient.ts @@ -27,7 +27,6 @@ export default function TestClient(app: Application) { newAssetCache = new Map(Object.entries(JSON.parse(rawdata.toString()))); } - //define routes app.use("/assets", express.static(path.join(__dirname, "..", "..", "assets"))); app.get("/assets/:file", async (req: Request, res: Response) => { delete req.headers.host; diff --git a/api/src/util/entities/AssetCacheItem.ts b/api/src/util/entities/AssetCacheItem.ts index 7fb4e1e6..160dece6 100644 --- a/api/src/util/entities/AssetCacheItem.ts +++ b/api/src/util/entities/AssetCacheItem.ts @@ -1,16 +1,3 @@ -import { Headers } from "node-fetch"; - export class AssetCacheItem { - public Key: string; - public FilePath: string; - public Headers: any; - - constructor(key: string){ - this.Key = key; - } - /*constructor(key: string, filePath: string, headers: Headers) { - this.Key = key; - this.FilePath = filePath; - this.Headers = headers; - }*/ + constructor(public Key: string, public FilePath: string = "", public Headers: any = null as any) {} } \ No newline at end of file diff --git a/fosscord-server.code-workspace b/fosscord-server.code-workspace index fff238f1..7491cb35 100644 --- a/fosscord-server.code-workspace +++ b/fosscord-server.code-workspace @@ -24,9 +24,5 @@ { "path": "webrtc" } - ], - "settings": { - "awooga.originalColorCustomizations": {}, - "workbench.colorCustomizations": {} - } + ] } -- cgit 1.5.1 From e7f89bb71825b6597047995c8164c1bf9d1bd742 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 00:39:50 +0200 Subject: New translations auth.json (Hebrew) --- api/locales/he/auth.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'api') diff --git a/api/locales/he/auth.json b/api/locales/he/auth.json index b7296868..e19547a0 100644 --- a/api/locales/he/auth.json +++ b/api/locales/he/auth.json @@ -1,16 +1,16 @@ { "login": { - "INVALID_LOGIN": "מייל או מספר טלפון לא נמצאים במאגר", - "INVALID_PASSWORD": "סיסמא שגויה", - "ACCOUNT_DISABLED": "משתמש זה חסום / מבוטל" + "INVALID_LOGIN": "E-Mail or Phone not found", + "INVALID_PASSWORD": "Invalid Password", + "ACCOUNT_DISABLED": "This account is disabled" }, "register": { - "REGISTRATION_DISABLED": "לא ניתן לאפשר רישום משתמשים חדשים", - "INVITE_ONLY": "עליך להיות מוזמן בכדי להרשם", - "EMAIL_INVALID": "מייל שגוי", - "EMAIL_ALREADY_REGISTERED": "מייל זה כבר רשום", - "DATE_OF_BIRTH_UNDERAGE": "{{years}} עלייך להיות מעל גיל", - "CONSENT_REQUIRED": ".עליך להסכים לתנאי השירות ולמדיניות הפרטיות", - "USERNAME_TOO_MANY_USERS": "ליותר מדי משתמשים יש שם משתמש זהה, אנא נסה אחר" + "REGISTRATION_DISABLED": "New user registration is disabled", + "INVITE_ONLY": "You must be invited to register", + "EMAIL_INVALID": "Invalid Email", + "EMAIL_ALREADY_REGISTERED": "Email is already registered", + "DATE_OF_BIRTH_UNDERAGE": "You need to be {{years}} years or older", + "CONSENT_REQUIRED": "You must agree to the Terms of Service and Privacy Policy.", + "USERNAME_TOO_MANY_USERS": "Too many users have this username, please try another" } } -- cgit 1.5.1 From 6aaa92349d9022b84f401a1f36da6c86d27a8b43 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 00:39:52 +0200 Subject: New translations common.json (Hebrew) --- api/locales/he/common.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'api') diff --git a/api/locales/he/common.json b/api/locales/he/common.json index 4101eac4..9e72e941 100644 --- a/api/locales/he/common.json +++ b/api/locales/he/common.json @@ -1,18 +1,18 @@ { "field": { - "BASE_TYPE_REQUIRED": "שדה זה חובה", - "BASE_TYPE_STRING": "שדה זה חייב להיות כטקסט", - "BASE_TYPE_NUMBER": "שדה זה חייב להיות מספר", - "BASE_TYPE_BIGINT": "השדה הזה חייב להיות ביגינט", - "BASE_TYPE_BOOLEAN": "השדה הזה חייב להיות בוליאני", - "BASE_TYPE_CHOICES": "({{types}}) שדה זה חייב להיות אחד מ", - "BASE_TYPE_CLASS": "{{type}} מסוג instance שדה זה חייב להיות", + "BASE_TYPE_REQUIRED": "This field is required", + "BASE_TYPE_STRING": "This field must be a string", + "BASE_TYPE_NUMBER": "This field must be a number", + "BASE_TYPE_BIGINT": "This field must be a bigint", + "BASE_TYPE_BOOLEAN": "This field must be a boolean", + "BASE_TYPE_CHOICES": "This field must be one of ({{types}})", + "BASE_TYPE_CLASS": "This field must be an instance of {{type}}", "BASE_TYPE_OBJECT": "שדה זה חייב להיות אובייקט", "BASE_TYPE_ARRAY": "שדה זה חייב להיות מערך", - "UNKOWN_FIELD": "{{key}} :מפתח לא ידוע", - "BASE_TYPE_CONSTANT": "{{value}} שדה זה חייב להיות", + "UNKOWN_FIELD": "מפתח לא ידוע: {{key}}", + "BASE_TYPE_CONSTANT": "שדה זה להיות {{value}}", "EMAIL_TYPE_INVALID_EMAIL": "כתובת דואר אלקטרוני לא חוקית", - "DATE_TYPE_PARSE": "ISO8601 אמור להיות {{date}} לא ניתן לאתר", - "BASE_TYPE_BAD_LENGTH": "{{length}} האורך חייב להיות בין" + "DATE_TYPE_PARSE": "לא ניתן לנתח {{date}}. צריך להיות ISO8601", + "BASE_TYPE_BAD_LENGTH": "האורך חייב להיות בין {{length}}" } } -- cgit 1.5.1 From 7ecbfa0184dc3554329f1067dc6139ae5a425700 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:15 +0200 Subject: New translations auth.json (Romanian) --- api/locales/ro/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ro/auth.json b/api/locales/ro/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ro/auth.json +++ b/api/locales/ro/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 867191194c9f8996f1ee82f4cb4f589f3263bbd8 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:16 +0200 Subject: New translations auth.json (Indonesian) --- api/locales/id/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/id/auth.json b/api/locales/id/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/id/auth.json +++ b/api/locales/id/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 9ac5ebb03b994d49c5969e27f9f956e3654e4412 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:17 +0200 Subject: New translations auth.json (Serbian (Cyrillic)) --- api/locales/sr/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/sr/auth.json b/api/locales/sr/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/sr/auth.json +++ b/api/locales/sr/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 16017e85ddf75cdae3e41f18ec08c9bcfce0c0c2 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:17 +0200 Subject: New translations auth.json (Swedish) --- api/locales/sv/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/sv/auth.json b/api/locales/sv/auth.json index 04e55752..573e685d 100644 --- a/api/locales/sv/auth.json +++ b/api/locales/sv/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-post eller telefon hittades inte", "INVALID_PASSWORD": "Ogiltigt lösenord", - "ACCOUNT_DISABLED": "Detta konto är inaktiverat" + "ACCOUNT_DISABLED": "Detta konto är inaktiverat", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "Registrering av nya användare är inaktiverat", -- cgit 1.5.1 From b418e062f5484afb162a4d9c98cf2dc755aaa7e6 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:18 +0200 Subject: New translations auth.json (Turkish) --- api/locales/tr/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/tr/auth.json b/api/locales/tr/auth.json index 1b3c4a8f..670f07e3 100644 --- a/api/locales/tr/auth.json +++ b/api/locales/tr/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-posta veya Telefon Numarası bulunamadı", "INVALID_PASSWORD": "Geçersiz Şifre", - "ACCOUNT_DISABLED": "Bu hesap devre dışı bırakıldı" + "ACCOUNT_DISABLED": "Bu hesap devre dışı bırakıldı", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "Yeni kullanıcı alımı devre dışı bırakıldı", -- cgit 1.5.1 From fe9b3b7dec3336e9ca080fc1d0bbc117cffa703a Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:19 +0200 Subject: New translations auth.json (Ukrainian) --- api/locales/uk/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/uk/auth.json b/api/locales/uk/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/uk/auth.json +++ b/api/locales/uk/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From cbed0892a19d0ca5348ac363ed3c3a15ca2e72d4 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:20 +0200 Subject: New translations auth.json (Chinese Simplified) --- api/locales/zh/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/zh/auth.json b/api/locales/zh/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/zh/auth.json +++ b/api/locales/zh/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 9cbcc18779480ab3e4a08282ccb58d625a08fff3 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:22 +0200 Subject: New translations auth.json (Urdu (Pakistan)) --- api/locales/ur/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ur/auth.json b/api/locales/ur/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ur/auth.json +++ b/api/locales/ur/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 3b228690520565e0034091d471e3c0b60d443c0e Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:23 +0200 Subject: New translations auth.json (Vietnamese) --- api/locales/vi/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/vi/auth.json b/api/locales/vi/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/vi/auth.json +++ b/api/locales/vi/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 1f8e64b279618920bac781effa2f184c95dbc136 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:23 +0200 Subject: New translations auth.json (Portuguese, Brazilian) --- api/locales/pt/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/pt/auth.json b/api/locales/pt/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/pt/auth.json +++ b/api/locales/pt/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From af5d79c402300f3965b9f03a027365ae5ab00572 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:24 +0200 Subject: New translations auth.json (Persian) --- api/locales/fa/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/fa/auth.json b/api/locales/fa/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/fa/auth.json +++ b/api/locales/fa/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From ec6a16f21d9a9f0b851c8d7e8dbfeac6f9274589 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:25 +0200 Subject: New translations auth.json (Russian) --- api/locales/ru/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ru/auth.json b/api/locales/ru/auth.json index 39a75b61..be7ac845 100644 --- a/api/locales/ru/auth.json +++ b/api/locales/ru/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "Данный адрес электронной почты или телефона не найден", "INVALID_PASSWORD": "Неверный пароль", - "ACCOUNT_DISABLED": "Этот аккаунт отключён" + "ACCOUNT_DISABLED": "Этот аккаунт отключён", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "Регистрация новых пользователей отключена", -- cgit 1.5.1 From 799b7ab064074086518f7030320b37ed731c4bee Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:26 +0200 Subject: New translations auth.json (Tamil) --- api/locales/ta/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ta/auth.json b/api/locales/ta/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ta/auth.json +++ b/api/locales/ta/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From c87225652a32eff0ec597fea2d0afe4e8cdd434f Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:27 +0200 Subject: New translations auth.json (Marathi) --- api/locales/mr/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/mr/auth.json b/api/locales/mr/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/mr/auth.json +++ b/api/locales/mr/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 70e6c052129ac514cfd4d44f8f904bdadaf7a920 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:28 +0200 Subject: New translations auth.json (Croatian) --- api/locales/hr/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/hr/auth.json b/api/locales/hr/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/hr/auth.json +++ b/api/locales/hr/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 5951aa218266efface50c86fae35550bdc2cd525 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:29 +0200 Subject: New translations auth.json (Norwegian Nynorsk) --- api/locales/nn/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/nn/auth.json b/api/locales/nn/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/nn/auth.json +++ b/api/locales/nn/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 9f5a579fb147f7664c1f325d610492556eecf240 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:30 +0200 Subject: New translations auth.json (Kazakh) --- api/locales/kk/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/kk/auth.json b/api/locales/kk/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/kk/auth.json +++ b/api/locales/kk/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 5bae82e40876ca0dccfb2e0bf0ab0512326cca12 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:31 +0200 Subject: New translations auth.json (Azerbaijani) --- api/locales/az/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/az/auth.json b/api/locales/az/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/az/auth.json +++ b/api/locales/az/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 578522fa73670bcc365f1a582a1073291efa34e7 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:32 +0200 Subject: New translations auth.json (Hindi) --- api/locales/hi/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/hi/auth.json b/api/locales/hi/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/hi/auth.json +++ b/api/locales/hi/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 1165fd6cf93c9e11460aed8fc346ac7d1e58fcb4 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:32 +0200 Subject: New translations auth.json (Maori) --- api/locales/mi/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/mi/auth.json b/api/locales/mi/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/mi/auth.json +++ b/api/locales/mi/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 8aa3442bd8024296a480e2c0935c6624e983b8d1 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:33 +0200 Subject: New translations auth.json (Telugu) --- api/locales/te/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/te/auth.json b/api/locales/te/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/te/auth.json +++ b/api/locales/te/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From a918fd4b2539f53ecadc04ce43119d0690896e06 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:34 +0200 Subject: New translations auth.json (Tagalog) --- api/locales/tl/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/tl/auth.json b/api/locales/tl/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/tl/auth.json +++ b/api/locales/tl/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 9bdea125a4ababb5add0c1518cbf791f32bbbf11 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:35 +0200 Subject: New translations auth.json (Slovak) --- api/locales/sk/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/sk/auth.json b/api/locales/sk/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/sk/auth.json +++ b/api/locales/sk/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From d7236bf6c50e0dc4fa306c10aa5a85171bb17610 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:37 +0200 Subject: New translations auth.json (French) --- api/locales/fr/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/fr/auth.json b/api/locales/fr/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/fr/auth.json +++ b/api/locales/fr/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 2a499261c3549ffcce11a50657295449ba4a4119 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:38 +0200 Subject: New translations auth.json (Basque) --- api/locales/eu/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/eu/auth.json b/api/locales/eu/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/eu/auth.json +++ b/api/locales/eu/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From b2951c6aff4ab015cc14ff8fd1fc225e454be3e8 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:39 +0200 Subject: New translations auth.json (Spanish) --- api/locales/es/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/es/auth.json b/api/locales/es/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/es/auth.json +++ b/api/locales/es/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 6afd1885bc03d95d682d0e7783c43cf6012a69d7 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:39 +0200 Subject: New translations auth.json (Afrikaans) --- api/locales/af/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/af/auth.json b/api/locales/af/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/af/auth.json +++ b/api/locales/af/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From b4a2c4f0f7f8537b451b67e41cbe348185184722 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:40 +0200 Subject: New translations auth.json (Arabic) --- api/locales/ar/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ar/auth.json b/api/locales/ar/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ar/auth.json +++ b/api/locales/ar/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From ebe1df44c8bdbb3401aa444f572729f1eba1d19d Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:41 +0200 Subject: New translations auth.json (Belarusian) --- api/locales/be/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/be/auth.json b/api/locales/be/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/be/auth.json +++ b/api/locales/be/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 8a308cfc31a53141a7d60233ce4343e20a7ad4a2 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:42 +0200 Subject: New translations auth.json (Bulgarian) --- api/locales/bg/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/bg/auth.json b/api/locales/bg/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/bg/auth.json +++ b/api/locales/bg/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 635dd6ca9e05ae776e10e121d5b4f9f19d2ec79d Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:43 +0200 Subject: New translations auth.json (Catalan) --- api/locales/ca/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ca/auth.json b/api/locales/ca/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ca/auth.json +++ b/api/locales/ca/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From b34a986e843583f88201e0a641572d4254c0e931 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:44 +0200 Subject: New translations auth.json (Czech) --- api/locales/cs/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/cs/auth.json b/api/locales/cs/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/cs/auth.json +++ b/api/locales/cs/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 5b8e6095d31ed6bdbbbeddd1c0ac52d05811943b Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:45 +0200 Subject: New translations auth.json (Danish) --- api/locales/da/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/da/auth.json b/api/locales/da/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/da/auth.json +++ b/api/locales/da/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 48c90f173d8295f639b1a6ffa7665f228d05d824 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:45 +0200 Subject: New translations auth.json (German) --- api/locales/de/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/de/auth.json b/api/locales/de/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/de/auth.json +++ b/api/locales/de/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 394271a46c293a7e0118fb0c82a1b0f3805ef233 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:46 +0200 Subject: New translations auth.json (Greek) --- api/locales/el/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/el/auth.json b/api/locales/el/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/el/auth.json +++ b/api/locales/el/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From de8c622f264c408195701020c347e793cb37c43b Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:47 +0200 Subject: New translations auth.json (Finnish) --- api/locales/fi/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/fi/auth.json b/api/locales/fi/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/fi/auth.json +++ b/api/locales/fi/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 5312081828c66b760e4ebabb4fab12507647fba1 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:48 +0200 Subject: New translations auth.json (Polish) --- api/locales/pl/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/pl/auth.json b/api/locales/pl/auth.json index 711cb4d7..ff17f237 100644 --- a/api/locales/pl/auth.json +++ b/api/locales/pl/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-mail lub numer telefonu nie został znaleziony", "INVALID_PASSWORD": "Nieprawidłowe hasło", - "ACCOUNT_DISABLED": "To konto jest nieaktywne" + "ACCOUNT_DISABLED": "To konto jest nieaktywne", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "Rejestracja nowych użytkowników jest wyłączona", -- cgit 1.5.1 From 28933fc7578b15eb1d798557b383822f6a32732c Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:49 +0200 Subject: New translations auth.json (Hebrew) --- api/locales/he/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/he/auth.json b/api/locales/he/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/he/auth.json +++ b/api/locales/he/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From b025d000d37b8e0b5645af31268ed42edc1c674b Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:50 +0200 Subject: New translations auth.json (Hungarian) --- api/locales/hu/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/hu/auth.json b/api/locales/hu/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/hu/auth.json +++ b/api/locales/hu/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 080cab1819391d0ddfc75bb725fda588c48bd410 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:51 +0200 Subject: New translations auth.json (Italian) --- api/locales/it/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/it/auth.json b/api/locales/it/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/it/auth.json +++ b/api/locales/it/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From bf1c6756b459696702cf78201a72f8a826eace22 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:52 +0200 Subject: New translations auth.json (Japanese) --- api/locales/ja/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ja/auth.json b/api/locales/ja/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ja/auth.json +++ b/api/locales/ja/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 5a7d7cb3daa25f6b78e8a3da80f6b3928a7e117d Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:53 +0200 Subject: New translations auth.json (Korean) --- api/locales/ko/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ko/auth.json b/api/locales/ko/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ko/auth.json +++ b/api/locales/ko/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From dd3f69ab333595eecb56acfed6bbdf1a26c76bc0 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:54 +0200 Subject: New translations auth.json (Lithuanian) --- api/locales/lt/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/lt/auth.json b/api/locales/lt/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/lt/auth.json +++ b/api/locales/lt/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 8bc4bdc60fc436df68ec78932c0d0daa2a113592 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:54 +0200 Subject: New translations auth.json (Mongolian) --- api/locales/mn/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/mn/auth.json b/api/locales/mn/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/mn/auth.json +++ b/api/locales/mn/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From f98af7480a42dbbf68ac102308a39ab930eea691 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:55 +0200 Subject: New translations auth.json (Dutch) --- api/locales/nl/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/nl/auth.json b/api/locales/nl/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/nl/auth.json +++ b/api/locales/nl/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 7eadac6a82ab62ea1808e4afea27de401d3f0b48 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:56 +0200 Subject: New translations auth.json (Norwegian) --- api/locales/no/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/no/auth.json b/api/locales/no/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/no/auth.json +++ b/api/locales/no/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 4d66b3e2e579095daaba37eaa4dd68c50f406333 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:57 +0200 Subject: New translations auth.json (Punjabi) --- api/locales/pa/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/pa/auth.json b/api/locales/pa/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/pa/auth.json +++ b/api/locales/pa/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 019470caeaea746ea7a95697975d73f613802936 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:58 +0200 Subject: New translations auth.json (Esperanto) --- api/locales/eo/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/eo/auth.json b/api/locales/eo/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/eo/auth.json +++ b/api/locales/eo/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From d6d4af661555784c6bf9d29cfd280a6472b72d10 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:44:59 +0200 Subject: New translations auth.json (Uyghur) --- api/locales/ug/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ug/auth.json b/api/locales/ug/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ug/auth.json +++ b/api/locales/ug/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 1904cdc872ef4b7b1eca06711e92c9e5d96bf99f Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:01 +0200 Subject: New translations auth.json (Tibetan) --- api/locales/bo/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/bo/auth.json b/api/locales/bo/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/bo/auth.json +++ b/api/locales/bo/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 2c1365e54490d70034383833ef52d0a159d9f8a0 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:02 +0200 Subject: New translations auth.json (Latin) --- api/locales/la/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/la/auth.json b/api/locales/la/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/la/auth.json +++ b/api/locales/la/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 35502b2d81636de01f21073d751c876104906de9 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:03 +0200 Subject: New translations auth.json (Sinhala) --- api/locales/si/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/si/auth.json b/api/locales/si/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/si/auth.json +++ b/api/locales/si/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 26ff03ada2e2f531972f1fa0a05c513beebb3855 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:04 +0200 Subject: New translations auth.json (Swahili) --- api/locales/sw/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/sw/auth.json b/api/locales/sw/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/sw/auth.json +++ b/api/locales/sw/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From b40cf4d8266d612d880184d93f421142eb1c5030 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:06 +0200 Subject: New translations auth.json (Kurmanji (Kurdish)) --- api/locales/ku/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ku/auth.json b/api/locales/ku/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ku/auth.json +++ b/api/locales/ku/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 02872e51efff119b52e31f739d4d8d4d1af0a970 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:07 +0200 Subject: New translations auth.json (Hausa) --- api/locales/ha/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ha/auth.json b/api/locales/ha/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ha/auth.json +++ b/api/locales/ha/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 8983d4a4d42ee72820cae8f24ba55c1b6cf77acf Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:08 +0200 Subject: New translations auth.json (Berber) --- api/locales/ber/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/ber/auth.json b/api/locales/ber/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/ber/auth.json +++ b/api/locales/ber/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 9a604216224ea19e7f5209c4705fa5e4e1b63401 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:09 +0200 Subject: New translations auth.json (Serbo-Croatian) --- api/locales/sh/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/sh/auth.json b/api/locales/sh/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/sh/auth.json +++ b/api/locales/sh/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 882da3369e2282632dbc4326d9cb1fb7823475a3 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:10 +0200 Subject: New translations auth.json (Quechua) --- api/locales/qu/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/qu/auth.json b/api/locales/qu/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/qu/auth.json +++ b/api/locales/qu/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 593547e584b33fa5d54fb5a771b5346583762dd3 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:11 +0200 Subject: New translations auth.json (Guarani) --- api/locales/gn/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/gn/auth.json b/api/locales/gn/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/gn/auth.json +++ b/api/locales/gn/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From 5748be814a3ec29bf2c58414294c24c737214949 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:12 +0200 Subject: New translations auth.json (Javanese) --- api/locales/jv/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/jv/auth.json b/api/locales/jv/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/jv/auth.json +++ b/api/locales/jv/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1 From c0b118906002bfd3646ab325fd67f2310be10887 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Aug 2022 02:45:13 +0200 Subject: New translations auth.json (Venetian) --- api/locales/vec/auth.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/locales/vec/auth.json b/api/locales/vec/auth.json index e19547a0..a78d4d60 100644 --- a/api/locales/vec/auth.json +++ b/api/locales/vec/auth.json @@ -2,7 +2,9 @@ "login": { "INVALID_LOGIN": "E-Mail or Phone not found", "INVALID_PASSWORD": "Invalid Password", - "ACCOUNT_DISABLED": "This account is disabled" + "ACCOUNT_DISABLED": "This account is disabled", + "INVALID_TOTP_CODE": "Invalid two-factor code.", + "INVALID_TOTP_SECRET": "Invalid two-factor secret." }, "register": { "REGISTRATION_DISABLED": "New user registration is disabled", -- cgit 1.5.1