<?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>dev.enekoalonso.com &#187; firebug</title>
	<atom:link href="http://dev.enekoalonso.com/tag/firebug/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.enekoalonso.com</link>
	<description>having fun with code</description>
	<lastBuildDate>Sat, 31 Jul 2010 05:51:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Interesting JSON vulnerability (old stuff)</title>
		<link>http://dev.enekoalonso.com/2010/05/14/interesting-json-vulnerability-old-stuff/</link>
		<comments>http://dev.enekoalonso.com/2010/05/14/interesting-json-vulnerability-old-stuff/#comments</comments>
		<pubDate>Fri, 14 May 2010 21:00:56 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[constructor]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=532</guid>
		<description><![CDATA[Somebody at work passed this article about an interesting vulnerability in web APIs that use JSON. The exploit combines Cross Site Request Forgery (CSRF) with a JSON Array hack allowing an evil site to grab sensitive user data from an unsuspecting user. The hack involves redefining the Array constructor, which is totally legal in Javascript. http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx [...]]]></description>
			<content:encoded><![CDATA[<p>Somebody at work passed this article about an interesting vulnerability in web APIs that use JSON.</p>
<blockquote><p>The exploit combines <a title="Cross Site Request Forgery" href="http://www.codinghorror.com/blog/archives/001175.html">Cross Site Request Forgery</a> (CSRF) with a JSON Array hack allowing an evil site to grab sensitive user data from an unsuspecting user. The hack involves redefining the Array constructor, which is totally legal in Javascript.</p></blockquote>
<p><a href="http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx">http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx</a></p>
<p>I&#8217;ve found a while ago that you can put pretty much any URL on a script tag and the browser will download the content right away, whether it&#8217;s javascript or not, as long as the type attribute in the tag is set to &#8216;text/javascript&#8217;.  But although browsers download the URL content and place it inside the script tag, you can&#8217;t get to the content from Javascript (using innerHTML, for instance). Or can you? Apparently, Firebug can, at least on the HTML tab. I&#8217;m not sure if Firebug has direct access to the DOM, other than through Javascript, but I hope that is the case.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>February 19, 2010 -- <a href="http://dev.enekoalonso.com/2010/02/19/having-fun-with-mooml-and-twitter/" title="Having fun with Mooml &#038; Twitter">Having fun with Mooml &#038; Twitter</a> (0)</li><li>July 30, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/" title="Titanium Developer: love and hate">Titanium Developer: love and hate</a> (2)</li><li>July 20, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/20/little-tricks-string-padding-in-javascript/" title="Little tricks: string padding in Javascript">Little tricks: string padding in Javascript</a> (2)</li><li>July 1, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/01/little-tricks-editing-strings-by-index-in-javascript-and-python/" title="Little tricks: editing strings by index in Javascript and Python">Little tricks: editing strings by index in Javascript and Python</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/05/14/interesting-json-vulnerability-old-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging cookies with Firebug 1.5/1.6</title>
		<link>http://dev.enekoalonso.com/2010/01/20/debugging-cookies-with-firebug-1-51-6/</link>
		<comments>http://dev.enekoalonso.com/2010/01/20/debugging-cookies-with-firebug-1-51-6/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 04:43:09 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[breakpoint]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firecookie]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=412</guid>
		<description><![CDATA[I&#8217;ve been using Firebug 1.5 since it was an alpha and now I&#8217;m using Firebug 1.6 alpha with Firefox 3.6. I&#8217;ve been also using Firecookie for a very long time now, but never realized about this: you can put breakpoints on cookies to detect changes! Good to know :) Related Posts:January 19, 2010 -- Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Firebug 1.5 since it was an alpha and now I&#8217;m using <a href="http://getfirebug.com/releases/firebug/1.6X/">Firebug 1.6</a> alpha with Firefox 3.6. I&#8217;ve been also using <a href="https://addons.mozilla.org/en-US/firefox/addon/6683">Firecookie</a> for a very long time now, but never realized about this: <a href="http://www.softwareishard.com/blog/firebug/new-firebug-15-debugging-cookies/">you can put breakpoints on cookies to detect changes!</a></p>
<p>Good to know :)</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>January 19, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/19/firefox-3-6rc2-firebug-1-6a/" title="Firefox 3.6RC2 &#038; Firebug 1.6a">Firefox 3.6RC2 &#038; Firebug 1.6a</a> (0)</li><li>November 30, 2008 -- <a href="http://dev.enekoalonso.com/2008/11/30/injecting-javascript-with-firebug/" title="Injecting javascript with Firebug">Injecting javascript with Firebug</a> (0)</li><li>May 14, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/14/interesting-json-vulnerability-old-stuff/" title="Interesting JSON vulnerability (old stuff)">Interesting JSON vulnerability (old stuff)</a> (0)</li><li>January 27, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/27/detecting-when-css-gets-loaded-by-the-browser-with-mootools-and-asset-css/" title="Detecting when CSS gets loaded by the browser with Mootools and Asset.css">Detecting when CSS gets loaded by the browser with Mootools and Asset.css</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/01/20/debugging-cookies-with-firebug-1-51-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox 3.6RC2 &amp; Firebug 1.6a</title>
		<link>http://dev.enekoalonso.com/2010/01/19/firefox-3-6rc2-firebug-1-6a/</link>
		<comments>http://dev.enekoalonso.com/2010/01/19/firefox-3-6rc2-firebug-1-6a/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 15:52:50 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=410</guid>
		<description><![CDATA[I love Firefox for web development. I have tried other browsers but nothing compares to the power of Firebug. For everything else I used to use Safari 4, but now I switched to Chrome. It is sooo fast. Either way, don&#8217;t miss Firefox 3.6RC2 with Firebug 1.6a! http://www.mozilla.com/en-US/firefox/3.6rc2/releasenotes/ http://getfirebug.com/releases/firebug/1.6X/ Related Posts:January 20, 2010 -- Debugging [...]]]></description>
			<content:encoded><![CDATA[<p>I love Firefox for web development. I have tried other browsers but nothing compares to the power of Firebug. For everything else I used to use Safari 4, but now I switched to Chrome. It is sooo fast.</p>
<p>Either way, don&#8217;t miss Firefox 3.6RC2 with Firebug 1.6a!<br />
<a href="http://www.mozilla.com/en-US/firefox/3.6rc2/releasenotes/">http://www.mozilla.com/en-US/firefox/3.6rc2/releasenotes/</a><br />
<a href="http://getfirebug.com/releases/firebug/1.6X/">http://getfirebug.com/releases/firebug/1.6X/</a></p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>January 20, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/20/debugging-cookies-with-firebug-1-51-6/" title="Debugging cookies with Firebug 1.5/1.6">Debugging cookies with Firebug 1.5/1.6</a> (0)</li><li>November 30, 2008 -- <a href="http://dev.enekoalonso.com/2008/11/30/injecting-javascript-with-firebug/" title="Injecting javascript with Firebug">Injecting javascript with Firebug</a> (0)</li><li>May 14, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/14/interesting-json-vulnerability-old-stuff/" title="Interesting JSON vulnerability (old stuff)">Interesting JSON vulnerability (old stuff)</a> (0)</li><li>January 27, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/27/detecting-when-css-gets-loaded-by-the-browser-with-mootools-and-asset-css/" title="Detecting when CSS gets loaded by the browser with Mootools and Asset.css">Detecting when CSS gets loaded by the browser with Mootools and Asset.css</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/01/19/firefox-3-6rc2-firebug-1-6a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Highlighting elements with Firebug console</title>
		<link>http://dev.enekoalonso.com/2008/12/02/highlighting-elements-with-firebug-console/</link>
		<comments>http://dev.enekoalonso.com/2008/12/02/highlighting-elements-with-firebug-console/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 19:24:27 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[prototypejs]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=74</guid>
		<description><![CDATA[Today I had an issue with an element was breaking a page layout, making the page width wider than 960px. I tried to find it with Firebug, looking at the layout properties of some divs and elements, but I couldn&#8217;t find it. I knew it had to be there, so I decided to highlight all [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had an issue with an element was breaking a page layout, making the page width wider than 960px. I tried to find it with Firebug, looking at the layout properties of some divs and elements, but I couldn&#8217;t find it. I knew it had to be there, so I decided to highlight all div elements in the page with a red border. And it worked! I found it right away.</p>
<p>Here is the code I used to highlight the fields (I had to do it in prototype only):</p>
<p>Prototype JS:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="sy0">&lt;</span>img src=<span class="st0">&quot;http://l.wordpress.com/latex.php?latex=%28%27div%27%29.each%28function%28item%29%7B%20%20%24%28item%29.setStyle%28%7B%20border%3A%20%27solid%201px%20red%27%20%7D%29%3B%7D%29%3B%3C%2Fpre%3EjQuery%3A%3Cpre%20lang%3D%22javascript%22%3E%24%28%27div%27%29.css%28%27border%27%2C%20%27solid%201px%20red%27%29%3B%3C%2Fpre%3EMootools%3A%3Cpre%20lang%3D%22javascript%22%3E&amp;bg=0D324F&amp;fg=FFFFFF&amp;s=1&quot;</span> title=<span class="st0">&quot;(&#39;div&#39;).each(function(item){ &nbsp;$(item).setStyle({ border: &#39;solid 1px red&#39; });});</span></div>
</li>
<li class="li1">
<div class="de1"><span class="st0"</span></div>
</li>
</ol>
</div>
<p>jQuery:
<pre lang="javascript">$('div').css('border', 'solid 1px red');</pre>
<p>Mootools:
<pre lang="javascript">" style="vertical-align:-20%;" class="tex" alt="('div').each(function(item){  $(item).setStyle({ border: 'solid 1px red' });});</pre>
<p>jQuery:
<pre lang="javascript">$('div').css('border', 'solid 1px red');</pre>
<p>Mootools:
<pre lang="javascript">" />('div').setStyle('border', 'solid 1px red');
</pre>
<p>PS: Note that by adding a 1px border to all divs in the page, the page layout will be affected and some items may display improperly. Of course, you can use other colors than red :)</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>November 30, 2008 -- <a href="http://dev.enekoalonso.com/2008/11/30/injecting-javascript-with-firebug/" title="Injecting javascript with Firebug">Injecting javascript with Firebug</a> (0)</li><li>September 2, 2009 -- <a href="http://dev.enekoalonso.com/2009/09/02/creating-html-blocks-with-mootools/" title="Creating HTML blocks with Mootools">Creating HTML blocks with Mootools</a> (3)</li><li>November 29, 2008 -- <a href="http://dev.enekoalonso.com/2008/11/29/jsclass-a-very-nice-object-oriented-approach/" title="JS.Class: a very nice object oriented approach">JS.Class: a very nice object oriented approach</a> (0)</li><li>May 14, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/14/interesting-json-vulnerability-old-stuff/" title="Interesting JSON vulnerability (old stuff)">Interesting JSON vulnerability (old stuff)</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/12/02/highlighting-elements-with-firebug-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Injecting javascript with Firebug</title>
		<link>http://dev.enekoalonso.com/2008/11/30/injecting-javascript-with-firebug/</link>
		<comments>http://dev.enekoalonso.com/2008/11/30/injecting-javascript-with-firebug/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 05:29:22 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=64</guid>
		<description><![CDATA[Sometimes you may want to include a Javascript file on a live web page to see how things will work or to try new things. Usually you would do this by editing the source code including the new file but there is a fastest way if you have Firefox with Firebug. Just run the following [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you may want to include a Javascript file on a live web page to see how things will work or to try new things. Usually you would do this by editing the source code including the new file but there is a fastest way if you have Firefox with Firebug. Just run the following code in the Javascript console:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> headID = document.<span class="me1">getElementsByTagName</span><span class="br0">&#40;</span><span class="st0">&quot;head&quot;</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> newScript = document.<span class="me1">createElement</span><span class="br0">&#40;</span><span class="st0">&#39;script&#39;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">newScript.<span class="me1">type</span> = <span class="st0">&#39;text/javascript&#39;</span>;</div>
</li>
<li class="li1">
<div class="de1">newScript.<span class="me1">src</span> = <span class="st0">&#39;http://enekoalonso.com/lib/jquery-1.2.6.min.js&#39;</span>;</div>
</li>
<li class="li1">
<div class="de1">headID.<span class="me1">appendChild</span><span class="br0">&#40;</span>newScript<span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Here I am loading the jQuery library from my own server, but I could load any Javascript from any server on the net. The best is this will work on any website, whenever you have access to the server or not. Once you have the Javascript loaded you can use it right away. For example, here on this blog I could use jQuery to check how the header will look if its height was only 100px by running the next command on the console:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1">jQuery<span class="br0">&#40;</span><span class="st0">&#39;#header&#39;</span><span class="br0">&#41;</span>.<span class="me1">css</span><span class="br0">&#40;</span><span class="st0">&#39;height&#39;</span>,<span class="nu0">100</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Yep, it won&#8217;t look very good, right? Try it! You have to see it by yourself. Firefox is great. Firebug is awesome. And Firebug&#8217;s Javascript console is the best thing ever!<br />
PS: In case you are wondering, the Javascript file injected will exist only on the current browser session.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>December 2, 2008 -- <a href="http://dev.enekoalonso.com/2008/12/02/highlighting-elements-with-firebug-console/" title="Highlighting elements with Firebug console">Highlighting elements with Firebug console</a> (0)</li><li>January 20, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/20/debugging-cookies-with-firebug-1-51-6/" title="Debugging cookies with Firebug 1.5/1.6">Debugging cookies with Firebug 1.5/1.6</a> (0)</li><li>January 19, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/19/firefox-3-6rc2-firebug-1-6a/" title="Firefox 3.6RC2 &#038; Firebug 1.6a">Firefox 3.6RC2 &#038; Firebug 1.6a</a> (0)</li><li>May 14, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/14/interesting-json-vulnerability-old-stuff/" title="Interesting JSON vulnerability (old stuff)">Interesting JSON vulnerability (old stuff)</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/11/30/injecting-javascript-with-firebug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
