<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rediscoverer &#187; Javascript/Ajax</title>
	<atom:link href="http://rediscoverer.net/archives/category/javascriptajax/feed" rel="self" type="application/rss+xml" />
	<link>http://rediscoverer.net</link>
	<description>... since almost everything is already out there.</description>
	<lastBuildDate>Sat, 28 Feb 2009 10:32:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>XSS</title>
		<link>http://rediscoverer.net/archives/27</link>
		<comments>http://rediscoverer.net/archives/27#comments</comments>
		<pubDate>Fri, 08 Jun 2007 12:21:44 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[Javascript/Ajax]]></category>
		<category><![CDATA[Reminders]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/27</guid>
		<description><![CDATA[Ok. Playtime&#8217;s over. Some people need to fix something. I&#8217;ve been playing with an XSS vulnerability in a social-networking site I&#8217;m using. The site had already had XSS holes in the past that got patched. But then the addition of new features always opened up new problems. One boring weekend, I got really curious with [...]]]></description>
			<content:encoded><![CDATA[<p>Ok. Playtime&#8217;s over. Some people need to fix something. </p>

<p>I&#8217;ve been playing with an <acronym title="Cross-site scripting">XSS</acronym> vulnerability in a social-networking site I&#8217;m using. The site had already had  <span class="caps">XSS </span>holes in the past that got patched. But then the addition of new features always opened up new problems.</p>

<p>One boring weekend, I got really curious with what I can do with <span class="caps">XSS.</span> Usually, whenever I see a site that is prone to script injection, I pop-up an alert box (a warning to fix the hole) and redirect them to somewhere else (usually Google). This time, I tried something neat. I&#8217;ve already read articles about stealing cookies via <span class="caps">XSS </span>but didn&#8217;t get to see how the stolen cookies were put into use. So I thought of doing an actual experiment if those things really work.</p>

<p>Long story short: it worked. I was able log into other user accounts without knowing their password. I asked <a href="http://subersibo.net">some</a> <a href="http://redyushen.net">people</a> for help to test this and gave them a demo. Really, I&#8217;m tempted to peek at other people&#8217;s account. But I don&#8217;t want guilt to keep me awake all night after a hard day&#8217;s job.</p>

<p>I already informed the folks at that site about the <span class="caps">XSS </span>hole. Maybe I&#8217;ll post how I did it after the vulnerability gets fixed. It was quite simple like the articles I&#8217;ve read before.</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/27/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IE doesn&#8217;t like trailing commas</title>
		<link>http://rediscoverer.net/archives/6</link>
		<comments>http://rediscoverer.net/archives/6#comments</comments>
		<pubDate>Tue, 18 Jul 2006 06:34:00 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Javascript/Ajax]]></category>
		<category><![CDATA[Reminders]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/blog/archives/6</guid>
		<description><![CDATA[I had this seemingly undetectable bug on one application I made using javascript. It was running fine on Firefox, no errors or warnings. But when my client checked it out the page wasn&#8217;t working. I wasn&#8217;t able to test it on IE right away since I only have Firefox installed on my office PC (which [...]]]></description>
			<content:encoded><![CDATA[<p>I had this seemingly undetectable bug on one application I made using javascript. It was running fine on Firefox, no errors or warnings. But when my client checked it out the page wasn&#8217;t working. I wasn&#8217;t able to test it on IE right away since I only have Firefox installed on my office PC (which is running on Linux with no <a title="Windows Emulator" href="http://winehq.com">Wine</a> installed). After arriving home, I looked at the page using IE and yes, the app wasn&#8217;t working. It took me the whole night to figure out what was going wrong. I forgot what error message IE was giving me. The only thing I remember is that it doesn&#8217;t  much about the problem. I read the code one more time, checking for any uninitialized variable or something that I might have overlooked. I was doubtful that it was suffering from cross-browser problems, since I relied mainly on <a title="Prototype Javascript Framework" href="http://prototype.conio.net">Prototype</a>&#8216;s nice collection of thingies that were already tested for cross-browser compatibility.</p>

<p>I loaded my javascript file on my editor (<a title="ConTEXT" href="http://context.cx">ConTEXT</a>) and began reading the code again. Half-way through the code, I saw a trailing comma inside an object definition. It kinda looked like this:</p>
<div class="igBar"><span id="ljavascript-2"><a href="#" onclick="javascript:showPlainTxt('javascript-2'); return false;"><span class="caps">PLAIN TEXT</span></a></span></div><div class="syntax_hilite"><span class="langName">JavaScript:</span><br /><div id="javascript-2">
<div class="javascript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">someClass.<span style="color: #006600;">prototype</span> =</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">someFunction: <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// do something</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">anotherFunction: <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// do another thing</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div></li></ol></div>
</div></div><br />
<p>I almost didn&#8217;t notice it. If it wasn&#8217;t for the big font I&#8217;ve set on my editor, I&#8217;d be rewriting a large chunk of my app. Hmmm&#8230; looks like Firefox is kind to orphan commas. </p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
