From 90e9b462507fb48a4600e7e18dd643c9c174506b 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/chrony/trunk@1678 ab2d0c66-481e-0410-8bed-d214d4d58bed --- chrony-details-html.lsp | 2 +- chrony-keyfile-html.lsp | 2 +- chrony-startstop-html.lsp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chrony-details-html.lsp b/chrony-details-html.lsp index 43e00d6..fb74521 100644 --- a/chrony-details-html.lsp +++ b/chrony-details-html.lsp @@ -11,7 +11,7 @@ io.write("") <% viewlibrary.dispatch_component("status") %> -

<%= data.label %>

+

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

<% displayitem(data.value.time) %> <% displayitem(data.value.sources) %> diff --git a/chrony-keyfile-html.lsp b/chrony-keyfile-html.lsp index 9d1188c..50420b6 100644 --- a/chrony-keyfile-html.lsp +++ b/chrony-keyfile-html.lsp @@ -8,7 +8,7 @@ <% displayitem(form.value.status) if form.value.status.errtxt then %> -
"> +
">
<% end %> diff --git a/chrony-startstop-html.lsp b/chrony-startstop-html.lsp index 2dafac5..7ad44f3 100644 --- a/chrony-startstop-html.lsp +++ b/chrony-startstop-html.lsp @@ -2,7 +2,7 @@

Management

-
" method="POST"> +" method="POST">
Program control-panel
> @@ -20,9 +20,9 @@
Previous action result
<% if data.value.result.value ~= "" then %> -

<%= string.gsub(data.value.result.value, "\n", "
") %>

+

<%= string.gsub(html.html_escape(data.value.result.value), "\n", "
") %>

<% end if data.value.result.errtxt then %> -

<%= string.gsub(data.value.result.errtxt, "\n", "
") %>

+

<%= string.gsub(html.html_escape(data.value.result.errtxt), "\n", "
") %>

<% end end %>
-- cgit v1.2.3