From 838a83b868de101266ebfdd48737482553d96518 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sun, 5 Nov 2023 00:04:42 +0530 Subject: [PATCH] fix: add max length password validation Signed-off-by: Pranav C --- packages/nocodb-sdk/src/lib/Api.ts | 24 +++++++++++++++++++++++- packages/nocodb/src/schema/swagger.json | 5 +++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index 4a080a7941..722bbb1cc5 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -85,6 +85,26 @@ export interface AttachmentReqType { title?: string; /** Attachment URL to be uploaded via upload-by-url */ url?: string; + /** The name of the attachment file name */ + fileName?: string; +} + +/** + * Model for File Request + */ +export interface FileReqType { + /** The mimetype of the file */ + mimetype?: string; + /** The name of the input used to upload the file */ + fieldname?: string; + /** The original name of the file */ + originalname?: string; + /** The size of the file */ + size?: number; + /** The encoding of the file */ + encoding?: string; + /** An buffer array containing the file content */ + buffer?: any; } /** @@ -10308,7 +10328,9 @@ export class Api< */ path: string; }, - data: AttachmentReqType, + data: { + files: FileReqType[]; + }, params: RequestParams = {} ) => this.request({ diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index 5061224070..9b4b27c2f9 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -20524,10 +20524,13 @@ ], "properties": { "currentPassword": { + "minLength": 8, + "maxLength": 128, "type": "string" }, "newPassword": { "minLength": 8, + "maxLength": 128, "type": "string" } }, @@ -20576,6 +20579,7 @@ "description": "New password", "example": "newpassword", "minLength": 8, + "maxLength": 128, "type": "string" } }, @@ -21596,6 +21600,7 @@ "description": "Password of the user", "example": "password123456789", "minLength": 8, + "maxLength": 128, "type": "string" }, "firstname": {