Skip to content

Commit 74a8c5d

Browse files
committed
Fix app crash when do unautorized things
1 parent 82a1a86 commit 74a8c5d

File tree

3 files changed

+60
-60
lines changed

3 files changed

+60
-60
lines changed

backend/lib/access.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export default function (tokenString) {
265265
schemas: [roleSchema, permsSchema, objectSchema, permissionSchema],
266266
});
267267

268-
const valid = ajv.validate("permissions", dataSchema);
268+
const valid = await ajv.validate("permissions", dataSchema);
269269
return valid && dataSchema[permission];
270270
} catch (err) {
271271
err.permission = permission;

backend/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"body-parser": "^1.20.3",
2121
"compression": "^1.7.4",
2222
"express": "^4.20.0",
23-
"express-fileupload": "^1.1.9",
24-
"gravatar": "^1.8.0",
25-
"jsonwebtoken": "^9.0.0",
23+
"express-fileupload": "^1.5.2",
24+
"gravatar": "^1.8.2",
25+
"jsonwebtoken": "^9.0.2",
2626
"knex": "2.4.2",
2727
"liquidjs": "10.6.1",
2828
"lodash": "^4.17.21",
@@ -38,7 +38,7 @@
3838
},
3939
"devDependencies": {
4040
"@apidevtools/swagger-parser": "^10.1.0",
41-
"@biomejs/biome": "^2.3.1",
41+
"@biomejs/biome": "^2.3.2",
4242
"chalk": "4.1.2",
4343
"nodemon": "^2.0.2"
4444
},

backend/yarn.lock

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -43,59 +43,59 @@
4343
ajv-draft-04 "^1.0.0"
4444
call-me-maybe "^1.0.2"
4545

46-
"@biomejs/biome@^2.3.1":
47-
version "2.3.1"
48-
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.3.1.tgz#d1a9284f52986324f288cdaf450331a0f3fb1da7"
49-
integrity sha512-A29evf1R72V5bo4o2EPxYMm5mtyGvzp2g+biZvRFx29nWebGyyeOSsDWGx3tuNNMFRepGwxmA9ZQ15mzfabK2w==
46+
"@biomejs/biome@^2.3.2":
47+
version "2.3.2"
48+
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.3.2.tgz#aeeb5f12c39571a18f36a919be63ba7dbc7b290a"
49+
integrity sha512-8e9tzamuDycx7fdrcJ/F/GDZ8SYukc5ud6tDicjjFqURKYFSWMl0H0iXNXZEGmcmNUmABgGuHThPykcM41INgg==
5050
optionalDependencies:
51-
"@biomejs/cli-darwin-arm64" "2.3.1"
52-
"@biomejs/cli-darwin-x64" "2.3.1"
53-
"@biomejs/cli-linux-arm64" "2.3.1"
54-
"@biomejs/cli-linux-arm64-musl" "2.3.1"
55-
"@biomejs/cli-linux-x64" "2.3.1"
56-
"@biomejs/cli-linux-x64-musl" "2.3.1"
57-
"@biomejs/cli-win32-arm64" "2.3.1"
58-
"@biomejs/cli-win32-x64" "2.3.1"
59-
60-
"@biomejs/cli-darwin-arm64@2.3.1":
61-
version "2.3.1"
62-
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.1.tgz#607835f8ef043e1a80f9ad2a232c9e860941ab60"
63-
integrity sha512-ombSf3MnTUueiYGN1SeI9tBCsDUhpWzOwS63Dove42osNh0PfE1cUtHFx6eZ1+MYCCLwXzlFlYFdrJ+U7h6LcA==
64-
65-
"@biomejs/cli-darwin-x64@2.3.1":
66-
version "2.3.1"
67-
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.1.tgz#654fe4aaa8ea5d5bde5457db4961ad5d214713ac"
68-
integrity sha512-pcOfwyoQkrkbGvXxRvZNe5qgD797IowpJPovPX5biPk2FwMEV+INZqfCaz4G5bVq9hYnjwhRMamg11U4QsRXrQ==
69-
70-
"@biomejs/cli-linux-arm64-musl@2.3.1":
71-
version "2.3.1"
72-
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.1.tgz#5fe502082a575c31ef808cf080cbcd4485964167"
73-
integrity sha512-+DZYv8l7FlUtTrWs1Tdt1KcNCAmRO87PyOnxKGunbWm5HKg1oZBSbIIPkjrCtDZaeqSG1DiGx7qF+CPsquQRcg==
74-
75-
"@biomejs/cli-linux-arm64@2.3.1":
76-
version "2.3.1"
77-
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.1.tgz#81c02547905d379dbb312e6ff24b04908c2e320f"
78-
integrity sha512-td5O8pFIgLs8H1sAZsD6v+5quODihyEw4nv2R8z7swUfIK1FKk+15e4eiYVLcAE4jUqngvh4j3JCNgg0Y4o4IQ==
79-
80-
"@biomejs/cli-linux-x64-musl@2.3.1":
81-
version "2.3.1"
82-
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.1.tgz#c7c00beb5eda1ad25185544897e66eeec6be3b0b"
83-
integrity sha512-Y3Ob4nqgv38Mh+6EGHltuN+Cq8aj/gyMTJYzkFZV2AEj+9XzoXB9VNljz9pjfFNHUxvLEV4b55VWyxozQTBaUQ==
84-
85-
"@biomejs/cli-linux-x64@2.3.1":
86-
version "2.3.1"
87-
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.1.tgz#7481d2e7be98d4de574df233766a5bdda037c897"
88-
integrity sha512-PYWgEO7up7XYwSAArOpzsVCiqxBCXy53gsReAb1kKYIyXaoAlhBaBMvxR/k2Rm9aTuZ662locXUmPk/Aj+Xu+Q==
89-
90-
"@biomejs/cli-win32-arm64@2.3.1":
91-
version "2.3.1"
92-
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.1.tgz#dac8c7c7223e97f86cd0eed7aa95584984761481"
93-
integrity sha512-RHIG/zgo+69idUqVvV3n8+j58dKYABRpMyDmfWu2TITC+jwGPiEaT0Q3RKD+kQHiS80mpBrST0iUGeEXT0bU9A==
94-
95-
"@biomejs/cli-win32-x64@2.3.1":
96-
version "2.3.1"
97-
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.1.tgz#f8818ab2c1e3a6e2ed8a656935173e5ce4c720be"
98-
integrity sha512-izl30JJ5Dp10mi90Eko47zhxE6pYyWPcnX1NQxKpL/yMhXxf95oLTzfpu4q+MDBh/gemNqyJEwjBpe0MT5iWPA==
51+
"@biomejs/cli-darwin-arm64" "2.3.2"
52+
"@biomejs/cli-darwin-x64" "2.3.2"
53+
"@biomejs/cli-linux-arm64" "2.3.2"
54+
"@biomejs/cli-linux-arm64-musl" "2.3.2"
55+
"@biomejs/cli-linux-x64" "2.3.2"
56+
"@biomejs/cli-linux-x64-musl" "2.3.2"
57+
"@biomejs/cli-win32-arm64" "2.3.2"
58+
"@biomejs/cli-win32-x64" "2.3.2"
59+
60+
"@biomejs/cli-darwin-arm64@2.3.2":
61+
version "2.3.2"
62+
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.2.tgz#93f866161abe32e702987ccbddf492c1aabe016f"
63+
integrity sha512-4LECm4kc3If0JISai4c3KWQzukoUdpxy4fRzlrPcrdMSRFksR9ZoXK7JBcPuLBmd2SoT4/d7CQS33VnZpgBjew==
64+
65+
"@biomejs/cli-darwin-x64@2.3.2":
66+
version "2.3.2"
67+
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.2.tgz#9c3dffdac12e4f4d8db7680ca20f58ace1f38c23"
68+
integrity sha512-jNMnfwHT4N3wi+ypRfMTjLGnDmKYGzxVr1EYAPBcauRcDnICFXN81wD6wxJcSUrLynoyyYCdfW6vJHS/IAoTDA==
69+
70+
"@biomejs/cli-linux-arm64-musl@2.3.2":
71+
version "2.3.2"
72+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.2.tgz#a0424d2fe355cc43c375b3fbf3e42d39b7221d0e"
73+
integrity sha512-2Zz4usDG1GTTPQnliIeNx6eVGGP2ry5vE/v39nT73a3cKN6t5H5XxjcEoZZh62uVZvED7hXXikclvI64vZkYqw==
74+
75+
"@biomejs/cli-linux-arm64@2.3.2":
76+
version "2.3.2"
77+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.2.tgz#f85717c04d420ede20523d173a1fc10df60d4d37"
78+
integrity sha512-amnqvk+gWybbQleRRq8TMe0rIv7GHss8mFJEaGuEZYWg1Tw14YKOkeo8h6pf1c+d3qR+JU4iT9KXnBKGON4klw==
79+
80+
"@biomejs/cli-linux-x64-musl@2.3.2":
81+
version "2.3.2"
82+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.2.tgz#d3e114c744c32d2c50a77c13476bd941819c92d8"
83+
integrity sha512-gzB19MpRdTuOuLtPpFBGrV3Lq424gHyq2lFj8wfX9tvLMLdmA/R9C7k/mqBp/spcbWuHeIEKgEs3RviOPcWGBA==
84+
85+
"@biomejs/cli-linux-x64@2.3.2":
86+
version "2.3.2"
87+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.2.tgz#f66ce85d2d757d45e6edecce04753a805bd816f0"
88+
integrity sha512-8BG/vRAhFz1pmuyd24FQPhNeueLqPtwvZk6yblABY2gzL2H8fLQAF/Z2OPIc+BPIVPld+8cSiKY/KFh6k81xfA==
89+
90+
"@biomejs/cli-win32-arm64@2.3.2":
91+
version "2.3.2"
92+
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.2.tgz#b46f8b47a3d97e766cc5ad5eb67d90eeb230b2cb"
93+
integrity sha512-lCruqQlfWjhMlOdyf5pDHOxoNm4WoyY2vZ4YN33/nuZBRstVDuqPPjS0yBkbUlLEte11FbpW+wWSlfnZfSIZvg==
94+
95+
"@biomejs/cli-win32-x64@2.3.2":
96+
version "2.3.2"
97+
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.2.tgz#a14f5e220dd496705278315ee3e5e028dd657344"
98+
integrity sha512-6Ee9P26DTb4D8sN9nXxgbi9Dw5vSOfH98M7UlmkjKB2vtUbrRqCbZiNfryGiwnPIpd6YUoTl7rLVD2/x1CyEHQ==
9999

100100
"@gar/promisify@^1.0.1":
101101
version "1.1.3"
@@ -861,7 +861,7 @@ expand-template@^2.0.3:
861861
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
862862
integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==
863863

864-
express-fileupload@^1.1.9:
864+
express-fileupload@^1.5.2:
865865
version "1.5.2"
866866
resolved "https://registry.yarnpkg.com/express-fileupload/-/express-fileupload-1.5.2.tgz#4da70ba6f2ffd4c736eab0776445865a9dbd9bfa"
867867
integrity sha512-wxUJn2vTHvj/kZCVmc5/bJO15C7aSMyHeuXYY3geKpeKibaAoQGcEv5+sM6nHS2T7VF+QHS4hTWPiY2mKofEdg==
@@ -1108,7 +1108,7 @@ graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.0, graceful-fs@^4.2.6:
11081108
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
11091109
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
11101110

1111-
gravatar@^1.8.0:
1111+
gravatar@^1.8.2:
11121112
version "1.8.2"
11131113
resolved "https://registry.yarnpkg.com/gravatar/-/gravatar-1.8.2.tgz#f298642b1562ed685af2ae938dbe31ec0c542cc1"
11141114
integrity sha512-GdRwLM3oYpFQKy47MKuluw9hZ2gaCtiKPbDGdcDEuYDKlc8eNnW27KYL9LVbIDzEsx88WtDWQm2ClBcsgBnj6w==
@@ -1352,7 +1352,7 @@ json-schema-traverse@^1.0.0:
13521352
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
13531353
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
13541354

1355-
jsonwebtoken@^9.0.0:
1355+
jsonwebtoken@^9.0.2:
13561356
version "9.0.2"
13571357
resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3"
13581358
integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==

0 commit comments

Comments
 (0)