Commit 48a8fe99 authored by Ted Trask's avatar Ted Trask

Fixes: hide source password, put wget password to file instead of commandline,...

Fixes: hide source password, put wget password to file instead of commandline, fix permissions bug. Bump to version 0.3.1
parent 20b71105
APP_NAME=weblog
PACKAGE=acf-$(APP_NAME)
VERSION=0.3.0
VERSION=0.3.1
APP_DIST=\
weblog* \
......
......@@ -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
......
......@@ -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()
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment