Skip to content

Commit 1e29633

Browse files
add allowed keys in generateFileInfo
1 parent dc08a1a commit 1e29633

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

src/api/middleware/validators/oneFileValidators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const validatorFileSize = async (req: Request, res: Response, next: NextF
106106
};
107107

108108
export const generateFileInfo = (body, method = 'PATCH') => {
109-
const keysAllowed = ['external_id', 'expired', 'expiration_date', 'information', ...(method === 'POST' ? ['destination'] : [])];
109+
const keysAllowed = ['external_id', 'expired', 'expiration_date', 'information', 'signature', 'namespace', 'size', 'base_host', 'base_url', ...(method === 'POST' ? ['destination'] : [])];
110110
const bodyKeys = Object.keys(body.changes ?? body);
111111
const hasAllowedKey = bodyKeys.some((key) => keysAllowed.includes(key));
112112
if (hasAllowedKey) {

src/api/package-lock.json

Lines changed: 12 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"cors": "^2.8.5",
1919
"dotenv": "^16.4.5",
20-
"express": "^4.17.1",
20+
"express": "4.21.2",
2121
"express-rate-limit": "^7.1.5",
2222
"form-data": "^4.0.1",
2323
"joi": "^17.13.3",

0 commit comments

Comments
 (0)