<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged xss</title>
<link>https://www.question2answer.org/qa/tag/xss</link>
<description>Powered by Question2Answer</description>
<item>
<title>SiteLock reports an XSS vulnerability in login page</title>
<link>https://www.question2answer.org/qa/47802/sitelock-reports-an-xss-vulnerability-in-login-page</link>
<description>

&lt;p&gt;We've recently signed up for SiteLock on our web server and it's reporting an XSS in the login page:&lt;/p&gt;

&lt;hr&gt;

&lt;pre&gt;URL:http://q2a.our-site.com/login?=LogIn&amp;amp;code=0-1441040883-7ad6946dd99e52fbef6d480fb07ff889b9381c19&amp;amp;dologin=Login&amp;amp;emailhandle=1&amp;amp;password=1&amp;amp;remember=1&amp;amp;to=

Cross site scripting vulnerability found in args: ,code,dologin,emailhandle,password,remember,to&lt;/pre&gt;

&lt;hr&gt;

&lt;p&gt;Is this a false-positive? I can see that any args sent are reproduced in the 'qa-part-form' but they seem to be correctly escaped and I can't see how to abuse this.&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/47802/sitelock-reports-an-xss-vulnerability-in-login-page</guid>
<pubDate>Tue, 08 Sep 2015 12:49:19 +0000</pubDate>
</item>
<item>
<title>How to know when to escape HTML entities?</title>
<link>https://www.question2answer.org/qa/6876/how-to-know-when-to-escape-html-entities</link>
<description>

&lt;p&gt;
	I just found that some code I had added to a theme was not escaped and thus open to HTML injection and XSS (although in my particular case it would only affect the hacker, not anyone else).&amp;nbsp;I had this code:&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;$handle = qa_get_logged_in_handle();
&lt;br&gt;
	$this-&amp;gt;output('etc ' . $handle . ' etc');&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	
	I have now added the&amp;nbsp;&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;qa_html&lt;/span&gt;&amp;nbsp;function to escape &lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;$handle&lt;/span&gt;. But how am I supposed to know which content is already escaped, and which is not? I see code like this in Q2A's theme, it's not obvious whether the title has already been escaped:&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;$headtitle=(strlen($pagetitle) ? ($pagetitle.' - ') : '').$this-&amp;gt;content['site_title'];
&lt;br&gt;
	$this-&amp;gt;output('&amp;lt;TITLE&amp;gt;'.$headtitle.'&amp;lt;/TITLE&amp;gt;');&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/6876/how-to-know-when-to-escape-html-entities</guid>
<pubDate>Wed, 01 Jun 2011 15:33:01 +0000</pubDate>
</item>
</channel>
</rss>