summaryrefslogtreecommitdiffstats
path: root/skins-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-01-21 22:04:37 +0000
committerTed Trask <ttrask01@yahoo.com>2009-01-21 22:04:37 +0000
commitfb64467361f779e4f9eea5b923056f85af2ed911 (patch)
treeec10a0b878f3126d66e0c21bfa89688aaecd6e6d /skins-model.lua
parent078aeba6444620d99dd5c201d8492d2471d2bc3b (diff)
downloadacf-alpine-baselayout-fb64467361f779e4f9eea5b923056f85af2ed911.tar.bz2
acf-alpine-baselayout-fb64467361f779e4f9eea5b923056f85af2ed911.tar.xz
Added escapespecialcharacters to format.lua to escape shell special characters. Reviewed all calls to io.popen and os.execute to escape special characters. Fixed file uploads in openssl and ipsectools with viewfunctions.lua. Tried to fix openssl renew when subject contains special characters, but not done yet.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1687 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'skins-model.lua')
-rw-r--r--skins-model.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/skins-model.lua b/skins-model.lua
index 441298e..620e7a7 100644
--- a/skins-model.lua
+++ b/skins-model.lua
@@ -1,8 +1,10 @@
-- acf model for displaying logfiles recusivly
module (..., package.seeall)
+require("format")
+
local function set_skins(skin)
- local cmd = "/bin/sed -i 's/skin=.*/skin=" .. skin .. "/' /etc/acf/acf.conf"
+ local cmd = "/bin/sed -i 's/skin=.*/skin=" .. format.escapespecialcharacters(skin) .. "/' /etc/acf/acf.conf"
local f, errtxt = io.popen(cmd)
local cmdoutput = f:read("*a")
if cmdoutput == "" then cmdoutput = "New skin selected" end