From: Clifton Palmer Date: Tue, 6 Aug 2024 08:31:46 +0000 (-0500) Subject: Hotfix 1.3.1 X-Git-Tag: 1.3.1 X-Git-Url: http://git.purplebirdman.com/public.git/commitdiff_plain/HEAD?hp=0e07fad7633fc93fb0ce69cf0e14f8b0558e1d9f Hotfix 1.3.1 * Fixed bug where publish.lua failed when no pattern provided --- diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index d3846c1..56e5244 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -9,7 +9,7 @@ networks: external: true services: web: - image: cjpalmer/public:1.3.0 + image: cjpalmer/public:1.3.1 volumes: - ${LOCAL_ROOT_DIR}:/storage - ${LOCAL_LINK_DIR}:/usr/local/apache2/htdocs diff --git a/docker-compose.yml b/docker-compose.yml index 7310822..de07b47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: web: build: . - image: cjpalmer/public:1.3.0 + image: cjpalmer/public:1.3.1 volumes: - ${LOCAL_ROOT_DIR}:/storage - public_data:/usr/local/apache2/htdocs diff --git a/lua/publish.lua b/lua/publish.lua index afe2fed..f562018 100644 --- a/lua/publish.lua +++ b/lua/publish.lua @@ -21,9 +21,12 @@ function handle(r) r.content_type = "text/html" local args = r:parseargs() - local pattern = string.gsub(args.pattern, '+', ' ') + local pattern = args.pattern if pattern then + -- filename might have spaces that apache replaces with '+' + pattern = string.gsub(pattern, '+', ' ') + local nonce = publish(r.context_document_root, pattern) if nonce == "" then r:puts( "No links created" )