summaryrefslogtreecommitdiff
path: root/lib/config
diff options
context:
space:
mode:
authorTilman Vatteroth2020-11-26 20:52:57 +0100
committerTilman Vatteroth2020-11-26 21:09:23 +0100
commit97312b5ed3db8e5967184fc2f693a47dcba091f5 (patch)
treedd3bc2b71d3bbdd80194696b7219ff09a44690ae /lib/config
parent66ad73d853d15423c63b823102931b35ef93722a (diff)
Remove pdf export code
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Diffstat (limited to 'lib/config')
-rw-r--r--lib/config/default.js1
-rw-r--r--lib/config/environment.js1
-rw-r--r--lib/config/hackmdEnvironment.js3
-rw-r--r--lib/config/index.js7
-rw-r--r--lib/config/oldDefault.js3
5 files changed, 2 insertions, 13 deletions
diff --git a/lib/config/default.js b/lib/config/default.js
index 00fa9eae..fe9b7059 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -160,7 +160,6 @@ module.exports = {
email: true,
allowEmailRegister: true,
allowGravatar: true,
- allowPDFExport: true,
openID: false,
// linkifyHeaderStyle - How is a header text converted into a link id.
// Header Example: "3.1. Good Morning my Friend! - Do you have 5$?"
diff --git a/lib/config/environment.js b/lib/config/environment.js
index cf9fb5a1..b123faca 100644
--- a/lib/config/environment.js
+++ b/lib/config/environment.js
@@ -137,7 +137,6 @@ module.exports = {
email: toBooleanConfig(process.env.CMD_EMAIL),
allowEmailRegister: toBooleanConfig(process.env.CMD_ALLOW_EMAIL_REGISTER),
allowGravatar: toBooleanConfig(process.env.CMD_ALLOW_GRAVATAR),
- allowPDFExport: toBooleanConfig(process.env.CMD_ALLOW_PDF_EXPORT),
openID: toBooleanConfig(process.env.CMD_OPENID),
linkifyHeaderStyle: process.env.CMD_LINKIFY_HEADER_STYLE
}
diff --git a/lib/config/hackmdEnvironment.js b/lib/config/hackmdEnvironment.js
index d4ae77f0..76e41361 100644
--- a/lib/config/hackmdEnvironment.js
+++ b/lib/config/hackmdEnvironment.js
@@ -121,6 +121,5 @@ module.exports = {
}
},
email: toBooleanConfig(process.env.HMD_EMAIL),
- allowEmailRegister: toBooleanConfig(process.env.HMD_ALLOW_EMAIL_REGISTER),
- allowPDFExport: toBooleanConfig(process.env.HMD_ALLOW_PDF_EXPORT)
+ allowEmailRegister: toBooleanConfig(process.env.HMD_ALLOW_EMAIL_REGISTER)
}
diff --git a/lib/config/index.js b/lib/config/index.js
index f78513a0..6aab2e28 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -125,7 +125,6 @@ config.isMattermostEnable = config.mattermost.clientID && config.mattermost.clie
config.isLDAPEnable = config.ldap.url
config.isSAMLEnable = config.saml.idpSsoUrl
config.isOAuth2Enable = config.oauth2.clientID && config.oauth2.clientSecret
-config.isPDFExportEnable = config.allowPDFExport
// Check gitlab api version
if (config.gitlab && config.gitlab.version !== 'v4' && config.gitlab.version !== 'v3') {
@@ -194,12 +193,6 @@ switch (config.imageUploadType) {
]
}
-// Disable PDF export due to security issue
-if (config.allowPDFExport) {
- config.allowPDFExport = false
- logger.warn('PDF export was disabled for this release to mitigate a critical security issue. This feature will hopefully become available again in future releases.')
-}
-
// generate correct path
config.sslCAPath.forEach(function (capath, i, array) {
array[i] = path.resolve(appRootPath, capath)
diff --git a/lib/config/oldDefault.js b/lib/config/oldDefault.js
index 90942951..738ad9f7 100644
--- a/lib/config/oldDefault.js
+++ b/lib/config/oldDefault.js
@@ -37,6 +37,5 @@ module.exports = {
// document
documentmaxlength: undefined,
imageuploadtype: undefined,
- allowemailregister: undefined,
- allowpdfexport: undefined
+ allowemailregister: undefined
}