From 8260458f8f5579262280202d195b3b95b06b9df1 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Tue, 22 Mar 2022 10:48:01 +0100 Subject: [PATCH] Revert "fix(chromium): regex only accepts tmp folder by default (#429)" This reverts commit 27018fa8e2f90734cc4024228eeed7884447cc14. --- Makefile | 4 ++-- pkg/modules/chromium/chromium.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2479d4d4..b8462b97 100644 --- a/Makefile +++ b/Makefile @@ -38,8 +38,8 @@ CHROMIUM_IGNORE_CERTIFICATE_ERRORS=false CHROMIUM_DISABLE_WEB_SECURITY=false CHROMIUM_ALLOW_FILE_ACCESS_FROM_FILES=false CHROMIUM_PROXY_SERVER= -CHROMIUM_ALLOW_LIST="^file:///tmp.*" -CHROMIUM_DENY_LIST= +CHROMIUM_ALLOW_LIST= +CHROMIUM_DENY_LIST="^file:///[^tmp].*" CHROMIUM_DISABLE_JAVASCRIPT=false CHROMIUM_DISABLE_ROUTES=false LIBREOFFICE_DISABLES_ROUTES=false diff --git a/pkg/modules/chromium/chromium.go b/pkg/modules/chromium/chromium.go index 72834262..07d1f3b4 100644 --- a/pkg/modules/chromium/chromium.go +++ b/pkg/modules/chromium/chromium.go @@ -254,8 +254,8 @@ func (mod Chromium) Descriptor() gotenberg.ModuleDescriptor { fs.Bool("chromium-disable-web-security", false, "Don't enforce the same-origin policy") fs.Bool("chromium-allow-file-access-from-files", false, "Allow file:// URIs to read other file:// URIs") fs.String("chromium-proxy-server", "", "Set the outbound proxy server; this switch only affects HTTP and HTTPS requests") - fs.String("chromium-allow-list", "^file:///tmp.*", "Set the allowed URLs for Chromium using a regular expression") - fs.String("chromium-deny-list", "", "Set the denied URLs for Chromium using a regular expression") + fs.String("chromium-allow-list", "", "Set the allowed URLs for Chromium using a regular expression") + fs.String("chromium-deny-list", "^file:///[^tmp].*", "Set the denied URLs for Chromium using a regular expression") fs.Bool("chromium-disable-javascript", false, "Disable JavaScript") fs.Bool("chromium-disable-routes", false, "Disable the routes")