@opengis/fastify-table 2.0.86 → 2.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedExtensions.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/file/utils/allowedExtensions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"allowedExtensions.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/file/utils/allowedExtensions.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,GAAG,EAAE,MAAM,EAsChB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,MAAM,EAInB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,MAAM,EAEnB,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,MAAM,EAetB,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;;;;;;;AAE1C,wBAKE"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const envExtensions = process.env.allowedExtensions?.startsWith?.("[")
|
|
2
|
+
? JSON.parse(process.env.allowedExtensions)
|
|
3
|
+
: process.env.allowedExtensions?.split?.(",");
|
|
4
|
+
const all = envExtensions || [
|
|
2
5
|
"jpg",
|
|
3
6
|
"jpeg",
|
|
4
7
|
"png",
|
|
@@ -37,19 +40,9 @@ const all = [
|
|
|
37
40
|
"heic",
|
|
38
41
|
"webp",
|
|
39
42
|
];
|
|
40
|
-
const images = [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"png",
|
|
44
|
-
"tiff",
|
|
45
|
-
"tif",
|
|
46
|
-
"ico",
|
|
47
|
-
"svg",
|
|
48
|
-
"heic",
|
|
49
|
-
"webp",
|
|
50
|
-
];
|
|
51
|
-
const videos = ["mp4", "mov", "avi"];
|
|
52
|
-
const documents = [
|
|
43
|
+
const images = all.filter((ext) => ["jpg", "jpeg", "png", "tiff", "tif", "ico", "svg", "heic", "webp"].includes(ext));
|
|
44
|
+
const videos = all.filter((ext) => ["mp4", "mov", "avi"].includes(ext));
|
|
45
|
+
const documents = all.filter((ext) => [
|
|
53
46
|
"pdf",
|
|
54
47
|
"doc",
|
|
55
48
|
"docx",
|
|
@@ -62,7 +55,7 @@ const documents = [
|
|
|
62
55
|
"xml",
|
|
63
56
|
"ppt",
|
|
64
57
|
"pptx",
|
|
65
|
-
];
|
|
58
|
+
].includes(ext));
|
|
66
59
|
export { all, images, videos, documents };
|
|
67
60
|
export default {
|
|
68
61
|
all,
|
|
@@ -51,7 +51,7 @@ export default async function verifyFunction(req, reply) {
|
|
|
51
51
|
uid,
|
|
52
52
|
});
|
|
53
53
|
req.session.secondFactorPassed = true;
|
|
54
|
-
if (!enabled) {
|
|
54
|
+
if (!enabled && email) {
|
|
55
55
|
const { recoveryCodes } = await pg
|
|
56
56
|
.query(`select social_auth_obj->'codesArray' as "recoveryCodes"
|
|
57
57
|
from admin.users_social_auth where uid=$1 and social_auth_type='TOTP'`, [uid])
|