]> Untitled Git - public.git/commitdiff
Hotfix 1.3.1 master 1.3.1
authorClifton Palmer <clifton.james.palmer@protonmail.com>
Tue, 6 Aug 2024 08:31:46 +0000 (03:31 -0500)
committerClifton Palmer <clifton.james.palmer@protonmail.com>
Tue, 6 Aug 2024 08:31:46 +0000 (03:31 -0500)
* Fixed bug where publish.lua failed when no pattern provided

docker-compose-prod.yml
docker-compose.yml
lua/publish.lua

index d3846c158b4b97aa6585411a2a6e88e178ac9e41..56e5244aee0aad9f8e691a4839133d534e172717 100644 (file)
@@ -9,7 +9,7 @@ networks:
         external: true
 services:
     web:
         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
         volumes:
         - ${LOCAL_ROOT_DIR}:/storage
         - ${LOCAL_LINK_DIR}:/usr/local/apache2/htdocs
index 73108228b847421595a24761d820beeedd8c677d..de07b47fdf25d85cdff9cb8804054b2ac54efb8d 100644 (file)
@@ -2,7 +2,7 @@ version: '3'
 services:
     web:
         build: .
 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
         volumes:
         - ${LOCAL_ROOT_DIR}:/storage
         - public_data:/usr/local/apache2/htdocs
index afe2fed871cf46c3ffc98e4b0efbd073d014e42c..f5620183cfdd906030a0bba48d321c6d40f654f0 100644 (file)
@@ -21,9 +21,12 @@ function handle(r)
     r.content_type = "text/html"
 
     local args = r:parseargs()
     r.content_type = "text/html"
 
     local args = r:parseargs()
-    local pattern = string.gsub(args.pattern, '+', ' ')
+    local pattern = args.pattern
 
     if pattern then
 
     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" )
         local nonce = publish(r.context_document_root, pattern)
         if nonce == "" then
             r:puts( "No links created" )