From 27018fa8e2f90734cc4024228eeed7884447cc14 Mon Sep 17 00:00:00 2001 From: Gabor Szabad Date: Fri, 25 Feb 2022 12:52:27 +0000 Subject: [PATCH] fix(chromium): regex only accepts tmp folder by default (#429) --- Makefile | 4 ++-- pkg/modules/chromium/chromium.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f075fbfb..e5e74457 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= -CHROMIUM_DENY_LIST="^file:///[^tmp].*" +CHROMIUM_ALLOW_LIST="^file:///tmp.*" +CHROMIUM_DENY_LIST= 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 07d1f3b4..72834262 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", "", "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.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.Bool("chromium-disable-javascript", false, "Disable JavaScript") fs.Bool("chromium-disable-routes", false, "Disable the routes")