<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A XSS Vulnerability in Almost Every PHP Form I&#8217;ve Ever Written</title>
	<atom:link href="http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/</link>
	<description>Real Web Admins.  Real World Experience.</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:28:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: PHPMailer - serverseitiges validieren der Eingabedaten nötig? - Seite 2 - php.de</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-814</link>
		<dc:creator>PHPMailer - serverseitiges validieren der Eingabedaten nötig? - Seite 2 - php.de</dc:creator>
		<pubDate>Mon, 06 Feb 2012 14:28:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-814</guid>
		<description>[...] Warum wird $_SERVER[&#039;PHP_SELF&#039;] immer als Standard für das Affenformular angegeben? Unter http://www.webadminblog.com/index.ph...-ever-written/ wird $_SERVER[&#039;SCRIPT_NAME&#039;] als Alternative vorgeschlagen. Für einen Anfänger nur    Mit leerem [...]</description>
		<content:encoded><![CDATA[<p>[...] Warum wird $_SERVER[&#039;PHP_SELF&#039;] immer als Standard für das Affenformular angegeben? Unter <a href="http://www.webadminblog.com/index.ph...-ever-written/" rel="nofollow">http://www.webadminblog.com/index.ph&#8230;-ever-written/</a> wird $_SERVER[&#039;SCRIPT_NAME&#039;] als Alternative vorgeschlagen. Für einen Anfänger nur    Mit leerem [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: meh</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-806</link>
		<dc:creator>meh</dc:creator>
		<pubDate>Tue, 10 Jan 2012 21:14:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-806</guid>
		<description>or just simply use &lt;form action=&quot;&quot; or action=&quot;.&quot;</description>
		<content:encoded><![CDATA[<p>or just simply use &lt;form action=&quot;&quot; or action=&quot;.&quot;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-729</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Fri, 13 May 2011 15:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-729</guid>
		<description>Lea, some of the newer browsers have built in some XSS defenses.  The newer versions of IE, for example, will display a message in the bar at the top saying that it blocked a potential XSS attack.  Also, my example is just a sample of what a URL would look like but it does not actually exist which could also be creating issues.  In any case, yes there are browsers that are vulnerable to XSS and the only way to completely prevent a XSS exploit from an end-user perspective is to turn off JavaScript in your browser.  Unfortunately, that breaks a good portion of other web functionality as well.</description>
		<content:encoded><![CDATA[<p>Lea, some of the newer browsers have built in some XSS defenses.  The newer versions of IE, for example, will display a message in the bar at the top saying that it blocked a potential XSS attack.  Also, my example is just a sample of what a URL would look like but it does not actually exist which could also be creating issues.  In any case, yes there are browsers that are vulnerable to XSS and the only way to completely prevent a XSS exploit from an end-user perspective is to turn off JavaScript in your browser.  Unfortunately, that breaks a good portion of other web functionality as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-728</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Wed, 11 May 2011 19:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-728</guid>
		<description>Thanks for the &quot;$_SERVER[&#039;SCRIPT_NAME&#039;]&quot; pointer - so simple - cannot believe that had not occurred to me...</description>
		<content:encoded><![CDATA[<p>Thanks for the &#8220;$_SERVER['SCRIPT_NAME']&#8221; pointer &#8211; so simple &#8211; cannot believe that had not occurred to me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Johnson</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-724</link>
		<dc:creator>Ben Johnson</dc:creator>
		<pubDate>Fri, 29 Apr 2011 22:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-724</guid>
		<description>Right, I get it now, thanks for the clarification.  Very dangerous stuff.</description>
		<content:encoded><![CDATA[<p>Right, I get it now, thanks for the clarification.  Very dangerous stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lea</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-720</link>
		<dc:creator>Lea</dc:creator>
		<pubDate>Wed, 27 Apr 2011 01:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-720</guid>
		<description>Not following this at all - when I tried it, the page failed to load as that url didn&#039;t exist.
Did you mean to make it a parameter?
eg
http://www.webadminblog.com/example.php?“&gt;alert(‘xss’);
But when I tried that, the browser encoded the brackets. Are there browsers that don&#039;t do that?

Fortunately, I still know I haven&#039;t made this mistake - the first thing I do is check that the path is the correct one, and 301 to the proper page if it isn&#039;t. I do this for SEO reasons; its nice to know its helped security :)</description>
		<content:encoded><![CDATA[<p>Not following this at all &#8211; when I tried it, the page failed to load as that url didn&#8217;t exist.<br />
Did you mean to make it a parameter?<br />
eg<br />
<a href="http://www.webadminblog.com/example.php?“&gt;alert(‘xss’)" rel="nofollow">http://www.webadminblog.com/example.php?“&gt;alert(‘xss’)</a>;<br />
But when I tried that, the browser encoded the brackets. Are there browsers that don&#8217;t do that?</p>
<p>Fortunately, I still know I haven&#8217;t made this mistake &#8211; the first thing I do is check that the path is the correct one, and 301 to the proper page if it isn&#8217;t. I do this for SEO reasons; its nice to know its helped security <img src='http://www.webadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-719</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Tue, 26 Apr 2011 20:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-719</guid>
		<description>Ben, the idea behind reflected cross-site scripting is that the attacker crafts a malicious URL and then tries to manipulate the victim (usually via some form of social engineering) into clicking on the link.  So if you take my example above using http://www.webadminblog.com/example.php&quot;&gt;&lt;script&gt;alert(&#039;xss&#039;);&lt;/script&gt;, you&#039;d see that if someone were tricked into going to that URL, they would indeed trigger the JavaScript which was embedded into the link.  So the user is not falling into their own XSS as you put it, they are falling into the attackers.  The real issue behind this attack, however, is that the script gets executed within the victim&#039;s browser.  This means that the attacker could steal the victim&#039;s cookies, use their login credentials to make requests (CSRF), create fake login forms, change page content, etc.  Does that make sense?</description>
		<content:encoded><![CDATA[<p>Ben, the idea behind reflected cross-site scripting is that the attacker crafts a malicious URL and then tries to manipulate the victim (usually via some form of social engineering) into clicking on the link.  So if you take my example above using <a href="http://www.webadminblog.com/example.php" rel="nofollow">http://www.webadminblog.com/example.php</a>&#8220;&gt;&lt;script&gt;alert(&#8216;xss&#8217;);&lt;/script&gt;, you&#8217;d see that if someone were tricked into going to that URL, they would indeed trigger the JavaScript which was embedded into the link.  So the user is not falling into their own XSS as you put it, they are falling into the attackers.  The real issue behind this attack, however, is that the script gets executed within the victim&#8217;s browser.  This means that the attacker could steal the victim&#8217;s cookies, use their login credentials to make requests (CSRF), create fake login forms, change page content, etc.  Does that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Johnson</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-718</link>
		<dc:creator>Ben Johnson</dc:creator>
		<pubDate>Tue, 19 Apr 2011 22:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-718</guid>
		<description>Am I missing something?

If the user knowingly manipulates $_SERVER[&#039;PHP_SELF&#039;] in the context of submitting a form then all they can do is inject Javascript into a page that only they themselves are viewing. 

That must be a proud moment when you fall to an XSS attack of your own doing?</description>
		<content:encoded><![CDATA[<p>Am I missing something?</p>
<p>If the user knowingly manipulates $_SERVER['PHP_SELF'] in the context of submitting a form then all they can do is inject Javascript into a page that only they themselves are viewing. </p>
<p>That must be a proud moment when you fall to an XSS attack of your own doing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Smith</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-688</link>
		<dc:creator>Matt Smith</dc:creator>
		<pubDate>Mon, 22 Nov 2010 00:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-688</guid>
		<description>Great post, very helpful. I have created several projects in much the same way. Thanks for the insight regarding $_SERVER[&#039;SCRIPT_NAME&#039;]. There are a lot of similar posts out there, but very few of them explain or even suggest using SCRIPT_NAME instead of PHP_SELF.</description>
		<content:encoded><![CDATA[<p>Great post, very helpful. I have created several projects in much the same way. Thanks for the insight regarding $_SERVER['SCRIPT_NAME']. There are a lot of similar posts out there, but very few of them explain or even suggest using SCRIPT_NAME instead of PHP_SELF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/comment-page-1/#comment-683</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Fri, 12 Nov 2010 14:43:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.webadminblog.com/?p=401#comment-683</guid>
		<description>I&#039;m not exactly sure why a script having a form that posts to itself would be considered a vulnerability in and of itself, but without proper input validation and output encoding, there&#039;s a high likelihood that you&#039;ll find actual vulnerabilities in that script.

~josh</description>
		<content:encoded><![CDATA[<p>I&#8217;m not exactly sure why a script having a form that posts to itself would be considered a vulnerability in and of itself, but without proper input validation and output encoding, there&#8217;s a high likelihood that you&#8217;ll find actual vulnerabilities in that script.</p>
<p>~josh</p>
]]></content:encoded>
	</item>
</channel>
</rss>

