fix: sanitize SVG uploads
This commit is contained in:
@@ -29,7 +29,8 @@ module.exports = {
|
||||
authJwtExpiration: WIKI.config.auth.tokenExpiration,
|
||||
authJwtRenewablePeriod: WIKI.config.auth.tokenRenewal,
|
||||
uploadMaxFileSize: WIKI.config.uploads.maxFileSize,
|
||||
uploadMaxFiles: WIKI.config.uploads.maxFiles
|
||||
uploadMaxFiles: WIKI.config.uploads.maxFiles,
|
||||
uploadScanSVG: WIKI.config.uploads.scanSVG
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -97,7 +98,8 @@ module.exports = {
|
||||
|
||||
WIKI.config.uploads = {
|
||||
maxFileSize: _.get(args, 'uploadMaxFileSize', WIKI.config.uploads.maxFileSize),
|
||||
maxFiles: _.get(args, 'uploadMaxFiles', WIKI.config.uploads.maxFiles)
|
||||
maxFiles: _.get(args, 'uploadMaxFiles', WIKI.config.uploads.maxFiles),
|
||||
scanSVG: _.get(args, 'uploadScanSVG', WIKI.config.uploads.scanSVG)
|
||||
}
|
||||
|
||||
await WIKI.configSvc.saveToDb(['host', 'title', 'company', 'contentLicense', 'seo', 'logoUrl', 'auth', 'features', 'security', 'uploads'])
|
||||
|
@@ -54,6 +54,7 @@ type SiteMutation {
|
||||
securityCSPDirectives: String
|
||||
uploadMaxFileSize: Int
|
||||
uploadMaxFiles: Int
|
||||
uploadScanSVG: Boolean
|
||||
|
||||
): DefaultResponse @auth(requires: ["manage:system"])
|
||||
}
|
||||
@@ -63,15 +64,15 @@ type SiteMutation {
|
||||
# -----------------------------------------------
|
||||
|
||||
type SiteConfig {
|
||||
host: String!
|
||||
title: String!
|
||||
description: String!
|
||||
robots: [String]!
|
||||
analyticsService: String!
|
||||
analyticsId: String!
|
||||
company: String!
|
||||
contentLicense: String!
|
||||
logoUrl: String!
|
||||
host: String
|
||||
title: String
|
||||
description: String
|
||||
robots: [String]
|
||||
analyticsService: String
|
||||
analyticsId: String
|
||||
company: String
|
||||
contentLicense: String
|
||||
logoUrl: String
|
||||
authAutoLogin: Boolean
|
||||
authEnforce2FA: Boolean
|
||||
authHideLocal: Boolean
|
||||
@@ -79,18 +80,19 @@ type SiteConfig {
|
||||
authJwtAudience: String
|
||||
authJwtExpiration: String
|
||||
authJwtRenewablePeriod: String
|
||||
featurePageRatings: Boolean!
|
||||
featurePageComments: Boolean!
|
||||
featurePersonalWikis: Boolean!
|
||||
securityOpenRedirect: Boolean!
|
||||
securityIframe: Boolean!
|
||||
securityReferrerPolicy: Boolean!
|
||||
securityTrustProxy: Boolean!
|
||||
securitySRI: Boolean!
|
||||
securityHSTS: Boolean!
|
||||
securityHSTSDuration: Int!
|
||||
securityCSP: Boolean!
|
||||
securityCSPDirectives: String!
|
||||
uploadMaxFileSize: Int!
|
||||
uploadMaxFiles: Int!
|
||||
featurePageRatings: Boolean
|
||||
featurePageComments: Boolean
|
||||
featurePersonalWikis: Boolean
|
||||
securityOpenRedirect: Boolean
|
||||
securityIframe: Boolean
|
||||
securityReferrerPolicy: Boolean
|
||||
securityTrustProxy: Boolean
|
||||
securitySRI: Boolean
|
||||
securityHSTS: Boolean
|
||||
securityHSTSDuration: Int
|
||||
securityCSP: Boolean
|
||||
securityCSPDirectives: String
|
||||
uploadMaxFileSize: Int
|
||||
uploadMaxFiles: Int
|
||||
uploadScanSVG: Boolean
|
||||
}
|
||||
|
Reference in New Issue
Block a user