From 72a3e69b5f4adafea8905e60213371ab1b2fc019 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 15 Jan 2009 21:44:39 +0000 Subject: Modified html.lua and viewlibrary.lua and all html files to html_escape variables before displaying them. git-svn-id: svn://svn.alpinelinux.org/acf/ipsec-tools/trunk@1678 ab2d0c66-481e-0410-8bed-d214d4d58bed --- ipsectools-details-html.lsp | 8 ++++---- ipsectools-listcerts-html.lsp | 4 ++-- ipsectools-uploadcert-html.lsp | 2 +- ipsectools-viewcert-html.lsp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ipsectools-details-html.lsp b/ipsectools-details-html.lsp index b16da64..c5cdb5c 100644 --- a/ipsectools-details-html.lsp +++ b/ipsectools-details-html.lsp @@ -9,7 +9,7 @@ io.write("") <% viewlibrary.dispatch_component("status") %> -

<%= data.label %>

+

<%= html.html_escape(data.label) %>

<% if not data.value.show_isakmp or #data.value.show_isakmp.value == 0 then @@ -23,13 +23,13 @@ else else io.write("idle") end - io.write(".png' width='16' height='16'> ".. entry.Destination.value .. "") + io.write(".png' width='16' height='16'> ".. html.html_escape(entry.Destination.value) .. "") io.write("\n") local tags = {"Created","Source","Destination", "St", "Phase2details"} for j,tag in pairs(tags) do io.write("") end io.write("
" .. - (entry[tag].label or "") .. ""..(entry[tag].value or "")) - if (entry[tag].descr) and (#entry[tag].descr > 0) then io.write(" (".. entry[tag].descr .. ")") end + html.html_escape(entry[tag].label) .. ""..html.html_escape(entry[tag].value)) + if (entry[tag].descr) and (#entry[tag].descr > 0) then io.write(" (".. html.html_escape(entry[tag].descr) .. ")") end io.write("
") diff --git a/ipsectools-listcerts-html.lsp b/ipsectools-listcerts-html.lsp index 90f8849..d2f3c69 100644 --- a/ipsectools-listcerts-html.lsp +++ b/ipsectools-listcerts-html.lsp @@ -4,7 +4,7 @@ <% displaycommandresults({"deletecert"}, session) %> <% displaycommandresults({"uploadcert"}, session, true) %> -

<%= view.label %>

+

<%= html.html_escape(view.label) %>

@@ -20,7 +20,7 @@ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/viewcert?cert="..cert.."&redir="..page_info.orig_action, label="View "} %> <% end %> - + <% end %>
<%= cert %><%= html.html_escape(cert) %>
diff --git a/ipsectools-uploadcert-html.lsp b/ipsectools-uploadcert-html.lsp index a3e88ba..02ed7a0 100644 --- a/ipsectools-uploadcert-html.lsp +++ b/ipsectools-uploadcert-html.lsp @@ -5,7 +5,7 @@ io.write(html.cfe_unpack(form)) --]] %> -

<%= form.label %>

+

<%= html.html_escape(form.label) %>

<% -- This is a kludge to get file upload working form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action .. '" enctype="multipart/form-data' diff --git a/ipsectools-viewcert-html.lsp b/ipsectools-viewcert-html.lsp index d23cb53..1acb166 100644 --- a/ipsectools-viewcert-html.lsp +++ b/ipsectools-viewcert-html.lsp @@ -5,4 +5,4 @@ io.write(html.cfe_unpack(view)) --]] %>

Certificate Details

-
<%= view.value.value %>
+
<%= html.html_escape(view.value.value) %>
-- cgit v1.2.3