<?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>Alex Rodriguez</title>
	<atom:link href="http://www.alexbr.com/wblog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.alexbr.com/wblog</link>
	<description>I don&#039;t play baseball.</description>
	<lastBuildDate>Fri, 20 May 2011 13:12:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Workaround for AJAX Cross-Domain Post Restrictions</title>
		<link>http://www.alexbr.com/wblog/?p=109</link>
		<comments>http://www.alexbr.com/wblog/?p=109#comments</comments>
		<pubDate>Wed, 27 Jan 2010 23:22:39 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[ajax cross site domain javascript]]></category>
		<category><![CDATA[bypass]]></category>
		<category><![CDATA[bypass ajax]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=109</guid>
		<description><![CDATA[We recently developed an application that requires our partners to incorporate a piece of our html code in their browser page. This component would be responsible for collecting information and posting it back to our site via ajax for validation. The inclusion of our code would be done using server side includes so as to [...]]]></description>
			<content:encoded><![CDATA[<p>We recently developed an application that requires our partners to incorporate a piece of our html code in their browser page. This component would be responsible for collecting information and posting it back to our site via ajax for validation. The inclusion of our code would be done using server side includes so as to avoid using frames and for security reasons. The end result would be that the partner would send their page with our html component included in it back to the browser; the browser would show the partner url. All in all very unobtrusive.</p>
<p>Once the user enters their information into a form on that page, our script would take over and submit the information to our server, at a different domain, via ajax. Our server would return the result of the validation of the information.</p>
<p>There is only one very big problem with this approach &#8211; browsers currently consider such a cross-domain ajax post a vulnerability. Browsers will not allow an ajax post to a domain that is different than the domain currently in the browser location. Check out the <a title="same origin policy" href="http://en.wikipedia.org/wiki/Same_origin_policy" target="_blank">same origin policy</a>.</p>
<p>I won&#8217;t dive into an argument for or against allowing cross-site ajax posting here, instead I&#8217;ll just provide the mechanism we used to perform this post without using the standard ajax method, eg. XMLHttpRequest.</p>
<p>At a high level, what we do is this:</p>
<ul>
<li>Capture user input on the client using javascript.</li>
<li>Construct a url containing our user input validation resource, a random identifier, and the query parameters from the user input.</li>
<li>Create a new &#8220;&lt;script&gt;&#8221; DOM node with a src reference to the constructed url. This results in an implicit request being sent by the browser for the javascript source.</li>
<li>Our server handles the request, validates the input, and returns pure javascript as a response. Embedded in this javascript is a function which will call javascript already sitting on the browser once it is loaded.</li>
<li>Once the javascript response is loaded into the DOM by the browser, the script is executed &#8211; performing whatever processing is necessary at the client.</li>
</ul>
<p>Below is the main script. This code handles user input and submits the input asynchronously by inserting a new script node into the DOM. This forces the browser to request the src for that script node. On the server, that request is handled, the input is validated, and javascript is returned back to the client which just executes the &#8216;responseCallback&#8217; method.</p>
<p><strong>Main Script:</strong></p>
<div class="codecolorer-container javascript vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;height:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript1.2&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #006600; font-style: italic;">// Validation url</span><br />
<span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://your.host.com/validationresource&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Callback method</span><br />
<span style="color: #003366; font-weight: bold;">var</span> callbackMethod <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Call this to kick off asynch server validation</span><br />
<span style="color: #003366; font-weight: bold;">function</span> submitRequest<span style="color: #009900;">&#40;</span>input1<span style="color: #339933;">,</span> input2<span style="color: #339933;">,</span> callback<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #006600; font-style: italic;">// Perform client side validation of input first</span><br />
&nbsp; <span style="color: #006600; font-style: italic;">// validateInput(input1, input2) &nbsp; &nbsp;</span><br />
&nbsp; <br />
&nbsp; <span style="color: #006600; font-style: italic;">// Assign callback</span><br />
&nbsp; callbackMethod <span style="color: #339933;">=</span> callback<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Find dom node where we'll insert our &quot;script&quot; node</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> dynamicjs <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;dynamicjs&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Remove if it already exists</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>dynamicjs <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> dynamicjs.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>dynamicjs<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Create url with params and timestamp to prevent caching. I believe</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// the timestamp must be part of the resource url to force the browser</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// to reload the javascript</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> params <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;input1=&quot;</span> <span style="color: #339933;">+</span> input1 <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;input2=&quot;</span> <span style="color: #339933;">+</span> input2<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> jsurl <span style="color: #339933;">=</span> url <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;?&quot;</span> <span style="color: #339933;">+</span> params<br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> fileref <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; fileref.<span style="color: #660066;">id</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;dynamicjs&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; fileref.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;type&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; fileref.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;src&quot;</span><span style="color: #339933;">,</span> jsurl<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Insert the node which results in a browser request to the server</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> fileref <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;undefined&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>fileref<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>err<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span> &nbsp;<br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #006600; font-style: italic;">// Callback method to be executed once a response comes back from</span><br />
<span style="color: #006600; font-style: italic;">// the server validation</span><br />
<span style="color: #003366; font-weight: bold;">function</span> responseCallback<span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span>callbackMethod<span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
<p>Below is the server code that handles the request, validates the input from the client, and returns a response that is basically a javascript file. That javascript file contains a script that calls the &#8216;responseCallback&#8217; method above with the result of the input validation.</p>
<p><strong>Server Code (Java):</strong></p>
<div class="codecolorer-container java vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ServletOutputStream out <span style="color: #339933;">=</span> response.<span style="color: #006633;">getOutputStream</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003399;">String</span> result <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ok&quot;</span><span style="color: #339933;">;</span><br />
response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
response.<span style="color: #006633;">setHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Cache-Control&quot;</span>, <span style="color: #0000ff;">&quot;no-cache&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
out.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;responseCallback('&quot;</span> <span style="color: #339933;">+</span> result <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;');&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getBytes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
out.<span style="color: #006633;">flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D109&amp;title=Workaround%20for%20AJAX%20Cross-Domain%20Post%20Restrictions" id="wpa2a_2"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=109</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Subversion Backup and Recovery</title>
		<link>http://www.alexbr.com/wblog/?p=103</link>
		<comments>http://www.alexbr.com/wblog/?p=103#comments</comments>
		<pubDate>Thu, 29 Oct 2009 20:22:30 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[subversion svn backup recovery]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=103</guid>
		<description><![CDATA[I wanted to convert one of our production machines from Fedora to Ubuntu server. One of the services this machine was running was subversion. I both tarred up the repository directory and used &#8216;svnadmin dump&#8217; to backup the repository. I scp&#8217;ed both files to another server. Upon recovery I wanted to use the dump but [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to convert one of our production machines from Fedora to Ubuntu server. One of the services this machine was running was subversion.</p>
<p>I both tarred up the repository directory and used &#8216;svnadmin dump&#8217; to backup the repository. I scp&#8217;ed both files to another server.</p>
<p>Upon recovery I wanted to use the dump but the dump file became corrupted.</p>
<p>Luckily, there&#8217;s an easy way to recover from a repository file backup. I just untarred the repository and used</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">svnadmin</span> recover <span style="color: #000000; font-weight: bold;">&lt;</span>repo path<span style="color: #000000; font-weight: bold;">&gt;</span></div></td></tr></tbody></table></div>
<p>It worked great!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D103&amp;title=Subversion%20Backup%20and%20Recovery" id="wpa2a_4"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn Off WordPress PHP Error Display</title>
		<link>http://www.alexbr.com/wblog/?p=94</link>
		<comments>http://www.alexbr.com/wblog/?p=94#comments</comments>
		<pubDate>Thu, 22 Oct 2009 21:23:52 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[devformatter]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[geshi]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=94</guid>
		<description><![CDATA[After updating WordPress and my devformatter plugin, I noticed some errors popping up from the geshi libraries: 12[22-Oct-2009 14:00:12] PHP Warning: &#160;array_keys() [&#60;a href='function.array-keys'&#62;function.array-keys&#60;/a&#62;]: The first argument should be an array in ***/geshi.php on line 3502 [22-Oct-2009 14:00:12] PHP Warning: &#160;Invalid argument supplied for foreach() in ***/geshi.php on line 3502 This was actually displaying in [...]]]></description>
			<content:encoded><![CDATA[<p>After updating WordPress and my devformatter plugin, I noticed some errors popping up from the geshi libraries:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[22-Oct-2009 14:00:12] PHP Warning: &nbsp;array_keys() [&lt;a href='function.array-keys'&gt;function.array-keys&lt;/a&gt;]: The first argument should be an array in ***/geshi.php on line 3502<br />
[22-Oct-2009 14:00:12] PHP Warning: &nbsp;Invalid argument supplied for foreach() in ***/geshi.php on line 3502</div></td></tr></tbody></table></div>
<p>This was actually displaying in the blog posts, which is bad for a number of reasons, including security.</p>
<p>You can turn off php error logging by finding your wp-config.php file, usually in your WordPress document root, and adding the following lines:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'log_errors'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'On'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display_errors'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Off'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D94&amp;title=Turn%20Off%20WordPress%20PHP%20Error%20Display" id="wpa2a_6"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=94</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dollar Rent a Car Will Rip You Off</title>
		<link>http://www.alexbr.com/wblog/?p=77</link>
		<comments>http://www.alexbr.com/wblog/?p=77#comments</comments>
		<pubDate>Thu, 22 Oct 2009 16:24:13 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[car rental]]></category>
		<category><![CDATA[dollar]]></category>
		<category><![CDATA[dollar rent a car]]></category>
		<category><![CDATA[ldw]]></category>
		<category><![CDATA[ldw1]]></category>
		<category><![CDATA[scam]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=77</guid>
		<description><![CDATA[Lesson learned: Dollar Rent a Car will try to rip you off. My girlfriend and I arrived in Las Vegas ready for a great trip. Two weeks hiking around the grand circle. We had our rental car arranged and the price set. We waited in line at Dollar for an hour while one clerk serviced [...]]]></description>
			<content:encoded><![CDATA[<p>Lesson learned: Dollar Rent a Car will try to rip you off.</p>
<p>My girlfriend and I arrived in Las Vegas ready for a great trip. Two weeks hiking around the grand circle. We had our rental car arranged and the price set.</p>
<p>We waited in line at Dollar for an hour while one clerk serviced the 40 people in front of us. This was starting off well. But hey, it was the cheapest.</p>
<p>We finally get up to the desk. I know the drill: just answer no, no, no to everything. So I did.</p>
<pre>
clerk: "Do you want insurance?"
me:    "No thanks, we don't need insurance. We have our own insurance."
clerk: "Do you want daily coverage?"
me:    "No. AAA will cover us for that."
clerk: "Do you want...?"
me:    "No. No. No."
clerk: "Ok, initial here, here, here."
</pre>
<p>I&#8217;m in a rush to get out of there at this point so I initial and we&#8217;re on our way. </p>
<p>The trip is great, we see lots of shit, I&#8217;m happy.</p>
<p>We get back to the northeast and find that Dollar charged us $340 more than we bargained for. They hit us up for an &#8220;LDW&#8221; charge, or Loss Damage Waiver. What the fuck?</p>
<p>I call them several times, dispute the charges online, send faxes with our original confirmation and price quote. I get the same bullshit: &#8220;Sorry. You initialed. We won&#8217;t reverse the charges.&#8221;</p>
<p>Ok, I did initial. I was in a rush. I didn&#8217;t read the fine print. Shame on me. But I did tell the clerk at least three times I didn&#8217;t want that garbage insurance or LDW and I have a confirmation letter from Dollar stating we would be charged $340 less!</p>
<p>I guess I&#8217;ll have to take this one because, well, Dollar scammed me legitimately. I initialed. Nonetheless it&#8217;s still a scam. I feel insulted and pissed.</p>
<p>My takeaways from this experience:</p>
<ul>
<li>Dollar Rent a Car will try to rip you off with LDW charges &#8211; buyer/renter beware definitely applies</li>
<li>The customer is not so important as a person but is very important as a wallet</li>
<li>The immediate bottom dollar is much more important than long term revenue or return revenue</li>
</ul>
<p>Dollar has lost my business, my friends&#8217; business, and hopefully your, the reader&#8217;s, business.</p>
<p>Check these links for other customer experiences or search google for &#8220;dollar rent a car scam&#8221;:<br />
<a href="http://www.complaintsboard.com/bycompany/dollar-rent-a-car-a59315.html">http://www.complaintsboard.com/bycompany/dollar-rent-a-car-a59315.html</a><br />
<a href="http://www.rateitall.com/i-7022-dollar-rent-a-car.aspx">http://www.rateitall.com/i-7022-dollar-rent-a-car.aspx</a><br />
<a href="http://www.consumeraffairs.com/travel/dollar_rates.html">http://www.consumeraffairs.com/travel/dollar_rates.html</a><br />
<a href="http://www.complaintsboard.com/complaints/dollar-rent-a-car-c265415.html">http://www.complaintsboard.com/complaints/dollar-rent-a-car-c265415.html</a><br />
<a href="http://www.planetfeedback.com/dollar+rent+a+car+systems+inc/billing/payment/dollar+rent-a-car+insurance+cost+fraud/179207">http://www.planetfeedback.com/dollar+rent+a+car+systems+inc/billing/payment/dollar+rent-a-car+insurance+cost+fraud/179207</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D77&amp;title=Dollar%20Rent%20a%20Car%20Will%20Rip%20You%20Off" id="wpa2a_8"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=77</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Windows XP Remote Desktop Broken</title>
		<link>http://www.alexbr.com/wblog/?p=71</link>
		<comments>http://www.alexbr.com/wblog/?p=71#comments</comments>
		<pubDate>Thu, 08 Oct 2009 00:06:13 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[rdp]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[windows update]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=71</guid>
		<description><![CDATA[After a recent windows update I found my remote desktop was broken. I did some troubleshooting and packet sniffing and still couldn&#8217;t track the problem down. Finally I stumbled upon this post, which fixed my problem. It turned out that an nvidia driver update broke RDP. Updating the driver to the latest WHQL fixed the [...]]]></description>
			<content:encoded><![CDATA[<p>After a recent windows update I found my remote desktop was broken. I did some troubleshooting and packet sniffing and still couldn&#8217;t track the problem down. </p>
<p>Finally I stumbled upon <a href="http://13levels.com/james/windows-xp-sp3-remote-desktop-broken-fixed">this post</a>, which fixed my problem. </p>
<p>It turned out that an nvidia driver update broke RDP. Updating the driver to the latest WHQL fixed the problem.</p>
<p>I love windows updates, they usually break more than they fix.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D71&amp;title=Windows%20XP%20Remote%20Desktop%20Broken" id="wpa2a_10"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing Sendmail</title>
		<link>http://www.alexbr.com/wblog/?p=54</link>
		<comments>http://www.alexbr.com/wblog/?p=54#comments</comments>
		<pubDate>Wed, 13 May 2009 22:01:41 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[sendmail pop smtp tls ssl]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=54</guid>
		<description><![CDATA[I recently needed to setup TLS for my company&#8217;s email server. My primary goal was to reconfigure our sendmail server to negotiate TLS with other email servers that supported it. This would allow us to send secure information via email to companies that also supported email over TLS. The first step was to generate certificates. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to setup TLS for my company&#8217;s email server. My primary goal was to reconfigure our sendmail server to negotiate TLS with other email servers that supported it. This would allow us to send secure information via email to companies that also supported email over TLS.</p>
<p>The first step was to generate certificates. This is easily done with openssl. I already have a key and scripts setup to generate cert requests with all necessary info filled in. The script looks something like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Hostname: &quot;</span> <span style="color: #c20cb9; font-weight: bold;">hostname</span><br />
openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">365</span> <span style="color: #660033;">-key</span> company.key <span style="color: #660033;">-config</span> csr_config <span style="color: #660033;">-out</span> <span style="color: #007800;">$hostname</span>.csr</div></td></tr></tbody></table></div>
<p>Take the output from that certificate request and provide it to your favorite signer to get a signed certificate. Take the key you used to generate the request and the signed certificate and put it somewhere on your server, say /etc/ssl/crt. Also make sure to put the cacerts bundle, or signing certificate chain, in that directory (or any other for that matter).</p>
<p>Next step is to configure sendmail. The following are the changes I needed to make to my sendmail.mc file under /etc/mail:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">define(`confTLS_SRV_OPTIONS', `V')dnl<br />
define(`confAUTH_OPTIONS', `A p y')dnl<br />
define(`CERT_DIR', `/etc/ssl/crt')dnl<br />
define(`confCACERT',`CERT_DIR/cacerts.crt')dnl<br />
define(`confCACERT_PATH', `CERT_DIR/cacerts')dnl<br />
define(`confSERVER_CERT',`CERT_DIR/your_signed_cert.crt')dnl<br />
define(`confSERVER_KEY',`CERT_DIR/your_key.key')dnl<br />
define(`confCLIENT_CERT',`CERT_DIR/your_signed_cert.crt')dnl<br />
define(`confCLIENT_KEY',`CERT_DIR/your_key.key')dnl<br />
define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl</div></td></tr></tbody></table></div>
<p>Most of that config points sendmail to your keys and certificates to be used for server and client mode. The line</p>
<p>define(`confAUTH_OPTIONS&#8217;, `A p y&#8217;)dnl</p>
<p>tells sendmail to perform smtp authentication after TLS negotiation has completed. The line</p>
<p>define(`confTLS_SRV_OPTIONS&#8217;, `V&#8217;)dnl</p>
<p>tells sendmail to skip requests for clients&#8217; certificates.</p>
<p>I would like to thank <a href="http://www.technoids.org/wwstarttls.html#MyPurposes">this site</a> and <a href="http://sial.org/howto/sendmail/tls-relay/">this site</a> for that helpful information.</p>
<p>Next, recompile the config file and restart sendmail with</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mail<br />
service <span style="color: #c20cb9; font-weight: bold;">sendmail</span> restart</div></td></tr></tbody></table></div>
<p>You can test your server using openssl:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">openssl s_client <span style="color: #660033;">-connect</span> localhost:<span style="color: #000000;">25</span> <span style="color: #660033;">-CAfile</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>crt<span style="color: #000000; font-weight: bold;">/</span>cacerts.crt <span style="color: #660033;">-starttls</span> smtp</div></td></tr></tbody></table></div>
<p>You should see &#8220;Verify return code: 0 (ok)&#8221; near the end of the output. Type &#8220;quit&#8221; to end the communication.</p>
<p>To test that sendmail will communicate properly as a client with another server, you can use the great site <a href="http://test.smtp.org">test.smtp.org</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D54&amp;title=Securing%20Sendmail" id="wpa2a_12"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=54</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logitech Squeezecenter Duplicates Songs</title>
		<link>http://www.alexbr.com/wblog/?p=34</link>
		<comments>http://www.alexbr.com/wblog/?p=34#comments</comments>
		<pubDate>Sun, 26 Apr 2009 13:58:56 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Home Tech]]></category>
		<category><![CDATA[home audio]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[slimserver]]></category>
		<category><![CDATA[squeezecenter mp3]]></category>
		<category><![CDATA[streaming]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=34</guid>
		<description><![CDATA[I use a Squeezebox to distribute my digital audio at home. I noticed an issue in Squeezecenter, the audio server, that can cause duplicate detection of songs in your library. If you have your Squeezecenter detect and parse your playlists, your playlists must reference your music using the same path structure that you use in [...]]]></description>
			<content:encoded><![CDATA[<p>I use a Squeezebox to distribute my digital audio at home. I noticed an issue in Squeezecenter, the audio server, that can cause duplicate detection of songs in your library. If you have your Squeezecenter detect and parse your playlists, your playlists must reference your music using the same path structure that you use in Squeezecenter.</p>
<p>For instance, in the shot below, I have Sqeezecenter looking for music under the path s:\completed (a mapped network disk). I also have playlists under s:\playlists.</p>
<p><img class="alignnone size-full wp-image-35" style="border: 1px solid black;" title="Settings" src="http://www.alexbr.com/wblog/wp-content/uploads/2009/04/2009-04-26_094117.png" alt="Settings" width="620" height="256" /></p>
<p>At first, I had my playlists referencing the UNC pathname to my music, so that the mapped drive letter wouldn&#8217;t be necessary (as it might be different on different computers). Squeezecenter scanned my playlists and found the file references, but because the pathname was different the software assumed the files were different and indexed them as different files. This resulted in duplicates in my library for all music I had in playlists. To solve this, I just changed the playlist paths so that they matched what I had set in Squeezecenter. A new scan of the library and playlists and Squeezecenter correctly recognized the files as being the same and didn&#8217;t produce duplicates.</p>
<p>So in your playlist files, change this:</p>
<p><strong>\\storageserver\</strong>Completed\Hard Rock\White Zombie\La Sexorcisto &#8211; Devil Music Vol. 1\05 White Zombie &#8211; Soul-Crusher.mp3</p>
<p>To this:</p>
<p><strong>s:\</strong>Completed\Hard Rock\White Zombie\La Sexorcisto &#8211; Devil Music Vol. 1\05 White Zombie &#8211; Soul-Crusher.mp3</p>
<p>As an aside, it would be nice to set a UNC network path within Squeezecenter, but it doesn&#8217;t currently allow it. I believe an older version did allow you to set your library as a UNC path on the network.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D34&amp;title=Logitech%20Squeezecenter%20Duplicates%20Songs" id="wpa2a_14"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About</title>
		<link>http://www.alexbr.com/wblog/?p=32</link>
		<comments>http://www.alexbr.com/wblog/?p=32#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:11:35 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[about]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=32</guid>
		<description><![CDATA[I&#8217;m the type of person who prefers doing things myself. Whether it be code development, bicycle repair, computer repair, car repair, home repair, or even how to barbecue a perfect rack of ribs, if I can do it myself, I do. The internet and its experts have provided me a wealth of information on how [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m the type of person who prefers doing things myself. Whether it be code development, bicycle repair, computer repair, car repair, home repair, or even how to barbecue a perfect rack of ribs, if I can do it myself, I do. The internet and its experts have provided me a wealth of information on how to deal with most of the obstacles I&#8217;ve encountered. So this blog is an attempt to give back some of what I&#8217;ve learned over the years.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D32&amp;title=About" id="wpa2a_16"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bugzilla 3.5 Advanced Search Breaks When Bugzilla Reverse Proxied</title>
		<link>http://www.alexbr.com/wblog/?p=3</link>
		<comments>http://www.alexbr.com/wblog/?p=3#comments</comments>
		<pubDate>Tue, 21 Apr 2009 21:04:21 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[bugzilla 3.5]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[mylyn]]></category>

		<guid isPermaLink="false">http://www.alexbrodriguez.com/wblog/?p=3</guid>
		<description><![CDATA[I recently upgraded my bugzilla installation to 3.5 to find my Eclipse-mylyn integration had broken. After some traffic inspection and a look at buglist.cgi, I found that new code was added to &#8220;clean&#8221; advanced bug queries. This code cleans the query, then performs a redirect to the new clean query using the correct bugzilla hostname [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded my bugzilla installation to 3.5 to find my Eclipse-mylyn integration had broken.</p>
<p>After some traffic inspection and a look at buglist.cgi, I found that new code was added to &#8220;clean&#8221; advanced bug queries. This code cleans the query, then performs a redirect to the new clean query using the correct bugzilla hostname but <em>using the local webserver port</em>. Because I was proxying traffic to my actual bugzilla server through another server on a different port, this redirect was invalid.</p>
<p>I fixed this by commenting out the following code in buglist.cgi:</p>
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># If query was POSTed, clean the URL from empty parameters and redirect back to</span><br />
<span style="color: #666666; font-style: italic;"># itself. This will make advanced search URLs more tolerable.</span><br />
<span style="color: #666666; font-style: italic;">#if ($cgi-&amp;gt;request_method() eq 'POST') {</span><br />
<span style="color: #666666; font-style: italic;">#    $cgi-&amp;gt;clean_search_url();</span><br />
<span style="color: #666666; font-style: italic;">#    print $cgi-&amp;gt;redirect(-url =&amp;gt; $cgi-&amp;gt;self_url());</span><br />
<span style="color: #666666; font-style: italic;">#    exit;</span><br />
<span style="color: #666666; font-style: italic;">#}</span></div></td></tr></tbody></table></div>
<p>I&#8217;ll try to actually fix the redirect tomorrow to take advantage of the cleanup.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.alexbr.com%2Fwblog%2F%3Fp%3D3&amp;title=Bugzilla%203.5%20Advanced%20Search%20Breaks%20When%20Bugzilla%20Reverse%20Proxied" id="wpa2a_18"><img src="http://www.alexbr.com/wblog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&#038;p=3</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

