aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2019-01-07 21:45:08 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2019-01-07 21:45:08 +0100
commit4429d6269252a329fa579e19ff1a32ce694a5a4d (patch)
treed6feac12b6b75f949a4cd5d696d32d2d552fa7a9
parent426fc7d872fbbed0a64e015d69c34f399fa450d5 (diff)
proper output encoding of poll title
-rwxr-xr-xdelete_poll.rb2
-rw-r--r--dudle.rb2
-rwxr-xr-xindex.cgi2
-rwxr-xr-xoverview.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/delete_poll.rb b/delete_poll.rb
index a88ec5d..624567c 100755
--- a/delete_poll.rb
+++ b/delete_poll.rb
@@ -106,7 +106,7 @@ else
end
$d.html << "<h2>" + _("Delete this poll") + "</h2>"
-$d.html << _("You want to delete the poll named") + " <b>#{$d.table.name}</b>.<br />"
+$d.html << _("You want to delete the poll named") + " <b>#{CGI.escapeHTML($d.table.name)}</b>.<br />"
$d.html << _("This is an irreversible action!") + "<br />"
$d.html << _("If you are sure that you want to permanently remove this poll, please type “%{question}” into the form.") % {:question => QUESTIONS[confirm]}
deletestr = _("Delete")
diff --git a/dudle.rb b/dudle.rb
index 210c367..53edbae 100644
--- a/dudle.rb
+++ b/dudle.rb
@@ -180,7 +180,7 @@ HEAD
<div id='main'>
#{tabs_to_html(@tab)}
<div id='content'>
- <h1 id='polltitle'>#{@title}</h1>
+ <h1 id='polltitle'>#{CGI.escapeHTML(@title)}</h1>
HEAD
diff --git a/index.cgi b/index.cgi
index b96a358..05a17b3 100755
--- a/index.cgi
+++ b/index.cgi
@@ -60,7 +60,7 @@ if $cgi.include?("create_poll") && $cgi.include?("poll_url")
File.open(f,"w").close
VCS.add(f)
}
- Poll.new(CGI.escapeHTML(polltitle),$cgi["poll_type"])
+ Poll.new(polltitle,$cgi["poll_type"])
Dir.chdir("..")
$d.html.header["status"] = "REDIRECT"
$d.html.header["Cache-Control"] = "no-cache"
diff --git a/overview.rb b/overview.rb
index 31cf7d0..d6658e7 100755
--- a/overview.rb
+++ b/overview.rb
@@ -40,7 +40,7 @@ $d << <<END
#{sendlink}
<ul>
<li><input id="humanReadableURL" value="#{$conf.siteurl}" type="text" size="80" readonly="readonly"></li>
- <li><a id="mailtoURL" href='mailto:?subject=#{CGI.escapeHTML(CGI.escape(subjectstr).gsub("+","%20"))}&amp;body=#{$conf.siteurl}'>#{mailstr}</a></li>
+ <li><a id="mailtoURL" href='mailto:?subject=#{CGI.escape(subjectstr).gsub("+","%20")}&amp;body=#{$conf.siteurl}'>#{mailstr}</a></li>
</ul>
</li>
<li>