summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-08-25 11:30:50 +0000
committerTed Trask <ttrask01@yahoo.com>2009-08-25 11:30:50 +0000
commit48a8fe99954ac0dc8ea9bd666fad1af3a97eb910 (patch)
tree4d3a886b3f914312294e69cc4ec58afa84a5c8ee
parent20b71105d64f7bbb136925e70c09d6c9408a72c5 (diff)
downloadacf-weblog-48a8fe99954ac0dc8ea9bd666fad1af3a97eb910.tar.bz2
acf-weblog-48a8fe99954ac0dc8ea9bd666fad1af3a97eb910.tar.xz
Fixes: hide source password, put wget password to file instead of commandline, fix permissions bug. Bump to version 0.3.1v0.3.1
-rw-r--r--Makefile2
-rw-r--r--weblog-editsource-html.lsp1
-rw-r--r--weblog-model.lua3
-rw-r--r--weblog-status-html.lsp2
4 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4906aff..745a017 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
APP_NAME=weblog
PACKAGE=acf-$(APP_NAME)
-VERSION=0.3.0
+VERSION=0.3.1
APP_DIST=\
weblog* \
diff --git a/weblog-editsource-html.lsp b/weblog-editsource-html.lsp
index c05a556..c15e30e 100644
--- a/weblog-editsource-html.lsp
+++ b/weblog-editsource-html.lsp
@@ -5,6 +5,7 @@ require("viewfunctions")
<H1><%= html.html_escape(form.label) %></H1>
<%
form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
+ form.value.passwd.type = "password"
if page_info.action == "editsource" then
form.value.sourcename.readonly = true
end
diff --git a/weblog-model.lua b/weblog-model.lua
index c5f6f5b..9e32e53 100644
--- a/weblog-model.lua
+++ b/weblog-model.lua
@@ -552,7 +552,8 @@ local connecttosource = function(source, cookiesfile)
local success = false
logme("Connecting to source "..source.sourcename)
if source.method == "http" or source.method == "https" then
- local cmd = "wget -O - --no-check-certificate --save-cookies "..cookiesfile.." --keep-session-cookies --post-data 'password="..source.passwd.."&userid="..source.userid.."&Logon=Logon' '"..source.method.."://"..source.source.."/cgi-bin/acf/acf-util/logon/logon' 2>/dev/null"
+ fs.write_file(cookiesfile, "password="..source.passwd.."&userid="..source.userid.."&Logon=Logon")
+ local cmd = "wget -O - --no-check-certificate --save-cookies "..cookiesfile.." --keep-session-cookies --post-file '"..cookiesfile.."' '"..source.method.."://"..format.escapespecialcharacters(source.source).."/cgi-bin/acf/acf-util/logon/logon' 2>/dev/null"
local f = io.popen(cmd)
local resultpage = f:read("*a")
f:close()
diff --git a/weblog-status-html.lsp b/weblog-status-html.lsp
index 7ad89a2..d0784ba 100644
--- a/weblog-status-html.lsp
+++ b/weblog-status-html.lsp
@@ -7,7 +7,7 @@ require("viewfunctions")
<H1>Weblog Database Status</H1>
<% local status
if viewlibrary and viewlibrary.dispatch_component then
- if session.permissions.postgresql.status then
+ if session.permissions.postgresql and session.permissions.postgresql.status then
status = viewlibrary.dispatch_component("postgresql/postgresql/status", nil, true)
end
end