<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Unhandled expression</title>
	<atom:link href="http://unhandledexpression.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://unhandledexpression.com</link>
	<description>One commit a day makes the bugs go away</description>
	<lastBuildDate>Mon, 19 Dec 2011 10:27:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='unhandledexpression.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/3290542993bb21ccd79e3beefcf77cb2?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Unhandled expression</title>
		<link>http://unhandledexpression.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://unhandledexpression.com/osd.xml" title="Unhandled expression" />
	<atom:link rel='hub' href='http://unhandledexpression.com/?pushpress=hub'/>
		<item>
		<title>How to get a certificate signed by multiple certification authorities</title>
		<link>http://unhandledexpression.com/2011/11/18/how-to-get-a-certificate-signed-by-multiple-certification-authorities/</link>
		<comments>http://unhandledexpression.com/2011/11/18/how-to-get-a-certificate-signed-by-multiple-certification-authorities/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 15:12:33 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Reinventing the wheel]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[x509]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=326</guid>
		<description><![CDATA[Sort of. Here is a way to do it, but I don&#8217;t a practical use for this hack right now. But it is fun anyway Here we go! I was thinking about ways to distribute trust, and played a bit with CA generation and OpenSSL, when it occured to me: it depends more on a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=326&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sort of. Here is a way to do it, but I don&#8217;t a practical use for this hack right now. But it is fun anyway <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Here we go!</h2>
<p>I was thinking about ways to distribute trust, and played a bit with CA generation and OpenSSL, when it occured to me: it depends more on a key pair than on a certificate! If I consider that I trust a key instead of a certificate, I begin to see a way (certificates are only restrictions on the trust between keys).</p>
<p>It is really easy to get multiple certification authorities to sign a certificate for the same key (even for the same subject name in some cases). You send the certificate signing request to two certificate authorities, and you get two certificates, for the same keys and same subject names. But the issuer, dates, serial and signature are different. That&#8217;s why a certificate has only one certification chain.</p>
<p>But what will happen if I delegates the certification to another key? Here is the idea:</p>
<ul>
<li>create a first key pair</li>
<li>create a CSR for this key pair, and add the certification authority extension</li>
<li>ask the certification authorities to sign this CSR</li>
<li>you now have multiple certificates, for one key pair, all of them with the same subject name, and with certification authority powers</li>
<li>create a second key pair</li>
<li>create a CSR for this key pair, with a subject name for your email/domain name/organisation/whatever</li>
<li>sign this CSR with the first key pair, and any of the CA certificates you obtained before</li>
</ul>
<p>You are now the proud owner of a valid certificate for your domain name, with multiple certification chains going up to each of the root CAs. Why? The issuer&#8217;s subject name and public key is the same for all of the generated CAs, and they&#8217;re included in the end certificate. Any generated CA certificate can be used to verify that signature, and all the certification paths will work. Cool, huh?</p>
<h2>Okay, but&#8230;</h2>
<ul>
<li>Creating a sub CA is very expensive (if you want it to be recognized by all the browsers)</li>
<li>good luck with creating multiple sub CA and getting away with it</li>
<li>Assuming that certification authorities accept it, the sub CA private key could be thrown away after signing the certificate. But who will create and delete the subCA key? you, one of the CAs?</li>
<li>In the case of TLS, serving all the certification chains will have no impact: the browsers take the first matching sub CA in the list for the verification, they will not retry with another sub CA if they don&#8217;t find a root (but if you serve one certification chain at a time, it will work).</li>
</ul>
<p>See, I said &#8220;no practical use&#8221; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/326/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=326&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/11/18/how-to-get-a-certificate-signed-by-multiple-certification-authorities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>Jtalk on Rails: editing Javascript in my browser</title>
		<link>http://unhandledexpression.com/2011/08/31/jtalk-on-rails-editing-javascript-in-my-browser/</link>
		<comments>http://unhandledexpression.com/2011/08/31/jtalk-on-rails-editing-javascript-in-my-browser/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 20:24:58 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[Reinventing the wheel]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[smalltalk]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=289</guid>
		<description><![CDATA[If you don&#8217;t know JTalk yet, you&#8217;re missing something. It&#8217;s an awesome piece of work: a Smalltalk to Javascript compiler and a Smalltalk editor running in Javascript, IN YOUR BROWSER! Go check it out, now! Now that you&#8217;ve played a bit with JTalk, let&#8217;s get started. If you&#8217;re like me, you&#8217;re a bit annoyed by WebDAV, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=289&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t know JTalk yet, you&#8217;re missing something. It&#8217;s an awesome piece of work: a Smalltalk to Javascript compiler and a Smalltalk editor running in Javascript, <strong>IN YOUR BROWSER</strong>! <a title="JTalk project page" href="http://jtalk-project.org/" target="_blank">Go check it out, now!</a></p>
<p>Now that you&#8217;ve played a bit with JTalk, let&#8217;s get started.</p>
<p>If you&#8217;re like me, you&#8217;re a bit annoyed by WebDAV, the proposed solution to save changes to disk. And if you&#8217;re like me, you would like to use Jtalk with Rails, and because you&#8217;re a lazy ass like me, you use WEBrick instead of Apache for your development.</p>
<p>Let&#8217;s hack something up to replace WebDAV!</p>
<h2>Create a Rails application</h2>
<p><pre class="brush: bash;">
rails new jtalkonrails
cd jtalkonrails
bundle install
rm public/index.html
rails generate controller home index
printf &quot;Jtalkonrails::Application.routes.draw do\n  root :to =&gt; \&quot;home#index\&quot;\nend\n&quot; &gt; config/routes.rb
</pre></p>
<p>(I should really make a script out of all my rails initialization commands, one of these days&#8230;)</p>
<h2>Add Jtalk to your application</h2>
<p><pre class="brush: bash;">
cd public/
wget http://github.com/NicolasPetton/jtalk/tarball/master --no-check-certificate
tar zxvf master
cp -R NicolasPetton-jtalk-20cd63e/st .
cp -R NicolasPetton-jtalk-20cd63e/js .
cp -R NicolasPetton-jtalk-20cd63e/css .
cp -R NicolasPetton-jtalk-20cd63e/ide .
rm -rf NicolasPetton-jtalk-20cd63e
</pre></p>
<p>JTalk stores source code in three forms: Smalltalk code, Javascript code and smaller Javascript code (&#8220;*.deploy.js&#8221;).</p>
<h2>Jtalk hello world: the Counter example</h2>
<p>now, edit app/views/layouts/application.html.erb so that it looks like this:</p>
<p><pre class="brush: xml;">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Jtalk On Rails&lt;/title&gt;
  &lt;%= stylesheet_link_tag :all %&gt;
  &lt;%= javascript_include_tag :defaults %&gt;
  &lt;%= csrf_meta_tag %&gt;
  &lt;script src=&quot;js/jtalk.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot;&gt; loadJtalk()&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;button onclick=&quot;smalltalk.Browser._open()&quot;&gt;Class browser&lt;/button&gt;

&lt;div id=&quot;counters&quot;&gt;&lt;/div&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
  jQuery(document).ready(function() {'#counters'._asJQuery()._append_(smalltalk.Counter._new())});
&lt;/script&gt;
&lt;%= yield %&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>Here, we included a button to open the code browser, and added a Counter in a div. Oh, I forgot to tell you: Jtalk works seamlessly with JQuery <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Now, go check it out, and you will seee the counter and be able to increase and decrease the value displayed (yes, that&#8217;s a counter).</p>
<h2>Editing the code</h2>
<p>Click on the &#8220;Class browser&#8221; button to start the IDE. Select the &#8220;Examples&#8221; category, the &#8220;Counter&#8221; class, the &#8220;actions&#8221; method category, and the &#8220;increase method&#8221;. You will see in the text box below the source code of the increase method:</p>
<p>
increase
    count := count + 1.
    header contents: [:html | html with: count asString]
</p>
<p>Edit that method to increase by steps of 2 instead of 1, and hit &#8220;Save&#8221;. Now, the counter on your page will increase by steps of 2.<br />
Unfortunately, on the next page refresh, you will lose these changes. That&#8217;s why the &#8220;Commit category&#8221; button is there.<br />
It will take the updated files (here, Examples.st, Examples.js and Examples.deploy.js) and make a PUT request to their original URL.</p>
<p>A PUT, you said? Well, I can work something out with a PUT.</p>
<h2>Saving the code</h2>
<p>Let&#8217;s create a new controller, called Uploader:</p>
<p><pre class="brush: bash;">
rails generate controller uploader jtalk
</pre></p>
<p>And edit config/routes.rb as follows:</p>
<p><pre class="brush: ruby;">
Jtalkonrails::Application.routes.draw do
  root :to =&gt; &quot;home#index&quot;
  if Rails.env == 'development'
    put 'st/:id' =&gt; 'uploader#jtalk'
    put 'js/:id' =&gt; 'uploader#jtalk'
    put 'js/:id.:deploy' =&gt; 'uploader#jtalk'
  end
end
</pre></p>
<p>Now the PUT requests are redirected to our controller, but only in the development environment. You do not want to make your JS editable from the browser in a production app. DO NOT WANT!</p>
<p>The only thing left is the controller itself:</p>
<p><pre class="brush: ruby;">
class UploaderController &lt; ApplicationController

  def jtalk
    path = Rails.root.join('public')
    if(params[:format] == &quot;js&quot;)
      path = path.join(&quot;js&quot;)
    elsif(params[:format] == &quot;st&quot;)
      path = path.join(&quot;st&quot;)
    end

    if(params[:deploy])
      path = path.join(params[:id]+&quot;.deploy.&quot;+params[:format])
    else
      path = path.join(params[:id]+&quot;.&quot;+params[:format])
    end

    File.open(path, &quot;w&quot;) do |f|
      f.write(request.body.read())
    end

    head 200
  end

end
</pre></p>
<p>Here, we build the file path from the parameters. I use <em>request.body.read()</em> to get the file content because Rails seems to truncate the beginning of the file.</p>
<h2>Profit</h2>
<p>Now, go back to the web page, click on &#8220;Commit category&#8221;, and refresh the page. Your changes were saved! You can enjoy editing your frontend directly from the webpage itself, in the code browser, and more importantly, write your whole frontend in Smalltalk! It&#8217;s still missing the workflow &#8220;edit-try-debug-edit-continue&#8221;, but it already feels just like a &#8220;normal&#8221; Smalltalk environment. <strong>It feels like home</strong> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Post Scriptum</h3>
<p>If you want to add a new category, it&#8217;s easy: create a file <em>Mycategory.js</em> and put it in <em>public/js</em>, with this content:</p>
<p><pre class="brush: jscript;">
smalltalk.addClass('Myclass', smalltalk.Object, [], 'Mycategory');

</pre></p>
<p>and change your initialization from <em>loadJtalk()</em> to <em>loadJtalk(new Array(&#8220;Mycategory.js&#8221;)).</em> The new category will now appear in the code browser, and clicking on &#8220;Commit category&#8221; will create the deployment file and Smalltalk source file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=289&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/08/31/jtalk-on-rails-editing-javascript-in-my-browser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>Manage your libraries with symlinks on Windows</title>
		<link>http://unhandledexpression.com/2011/08/16/manage-your-libraries-with-symlinks-on-windows/</link>
		<comments>http://unhandledexpression.com/2011/08/16/manage-your-libraries-with-symlinks-on-windows/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 15:22:55 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Reinventing the wheel]]></category>
		<category><![CDATA[DLL hell]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=265</guid>
		<description><![CDATA[My Windows development environment is a bit complex. I work on multiple projects, at multiple versions, with different compiler environments, and with dependencies on different libraries and versions of these libraries. Now, how do I specify where the compiler must search the libraries, and which version to use? Most of the time, I will add [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=265&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My Windows development environment is a bit complex. I work on multiple projects, at multiple versions, with different compiler environments, and with dependencies on different libraries and versions of these libraries.</p>
<p>Now, how do I specify where the compiler must search the libraries, and which version to use? Most of the time, I will add it directly in the project configuration. Easy at first, but quickly,I find myself writing by hand the path to each library (and header) in each project and each configuration of this project. And then, writing by hand the different names of the libraries (mylibrary.lib, mylibraryd.lib, mylibrary-static.lib, mylibrary-MTD.lib, etc).</p>
<p>And when I want to update to a new version of the library? If I&#8217;m lucky, I just have to change the library and header paths (in every project using the library). If not, I also have to change the name, because of the library developer&#8217;s convention.</p>
<p>The first solution to these problems was to use a batch file to launch Visual Studio and MSYS, and set some environment variables in this file. I quickly ended up with one big file containing two environment variables (include path and lib path) per library, possibly more if there were some big changes in the library names. My Visual Studio configuration was cluttered with $(MYLIBRARY_LIBPATH), $(MYLIBRARY_INCLUDEPATH), $(MYLIBRARY_NAME). It is unreadable, and again, impossible to maintain.</p>
<p>My solution comes from the Unix world, where you have a correct organization for your development files:</p>
<ul>
<li>one folder containing the subfolders include, bin and lib</li>
<li>library names including version, and a symlink (without the version number) to the latest version of the lib</li>
</ul>
<p>Can I do that on Windows? YES \o/</p>
<p><strong>Here is the trick</strong>: normal links on Windows won&#8217;t work, but the <em>mklink </em>tool can create symlinks. And Visual Studio will recognize those as files and folders while looking for libraries.</p>
<p>Now, how would I organize my development environment? I chose to use (and abuse) symlinks, to create include, lib and bin folders for each project and configuration, and use generic names for the libraries.</p>
<ul>
<li>I create a folder containing include, lib and bin</li>
<li>in the  include/ folder, I put symlinks to the header file or the subfolder for each library I will use in that project</li>
<li>in the lib directory, I create symlinks to the library version I want, one symlink per static/dynamic, MT/MD, Debug/Release version. But I could create one lib folder per static/dynamic, etc. A bit complex, but feasible (most of the time, I use only debug and release version, so it&#8217;s still manageable).</li>
</ul>
<p>With this setup, I only set the INCLUDE and LIB environment variables, and I use directly the library names I need.</p>
<p>Here is an example script I use to create different library folders for x86 and x64 libs:</p>
<p><pre class="brush: plain;">
echo &quot;Building include and library directories for Windows %PLATFORM%&quot;

@mkdir %PLATFORM%
@mkdir %PLATFORM%\include
@mkdir %PLATFORM%\lib

@mklink /D %PLATFORM%\include\boost %BOOST%\boost
@for %%i in (%BOOST%\lib\*.lib) do (mklink %PLATFORM%\lib\%%~ni.lib %%~fi)

@mklink /D %PLATFORM%\include\cpptest %CPPTEST%\include\cpptest
@for %%i in (%CPPTEST%\lib\*.lib) do (mklink %PLATFORM%\lib\%%~ni.lib %%~fi)

</pre></p>
<p>I set up the BOOST and CPPTEST environment variables in another file. Then, I launch Visual Studio from another script which includes it.</p>
<p>There may be better ways, and that system will evolve in the future, but I&#8217;m pretty comfortable with it right now <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Depending on my needs, I may grab from the bottom of my disk the package manager I wrote back in school, and make a big solution to download, build and link libs and personal projects. But later, I have some procrastination planned right now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/265/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=265&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/08/16/manage-your-libraries-with-symlinks-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails and oauth-plugin part 2: the consumer</title>
		<link>http://unhandledexpression.com/2011/06/28/rails-and-oauth-plugin-part-2-the-consumer/</link>
		<comments>http://unhandledexpression.com/2011/06/28/rails-and-oauth-plugin-part-2-the-consumer/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 07:00:19 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=253</guid>
		<description><![CDATA[In the previous post, I showed how you could build a provider with oauth-plugin and Rails. Now, I will demonstrate how to build a consumer (it&#8217;s a lot easier). I will assume that your provider is already running on localhost:3000. The consumer will run on localhost:4000 (run it with &#8220;rails server -p 4000&#8243;). Here we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=253&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the previous post, I showed how you could build a provider with oauth-plugin and Rails. Now, I will demonstrate how to build a consumer (it&#8217;s a lot easier).</p>
<p>I will assume that your provider is already running on localhost:3000. The consumer will run on localhost:4000 (run it with &#8220;rails server -p 4000&#8243;).</p>
<h2>Here we go!</h2>
<p><pre class="brush: bash;">
rails new consumer
cd consumer
</pre></p>
<p>Put this in your Gemfile:</p>
<p><pre class="brush: ruby;">
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'sqlite3'
gem 'devise'
gem &quot;oauth-plugin&quot;, &quot;&gt;= 0.4.0.pre1&quot;
</pre></p>
<p>And run these commands:</p>
<p><pre class="brush: bash;">
bundle install
rails generate devise:install
rails generate devise User
rake db:migrate
rails generate controller welcome index
rm public/index.html
</pre></p>
<p>And here is your routes.rb:</p>
<p><pre class="brush: ruby;">
Provider::Application.routes.draw do
devise_for :users
root :to =&gt; &quot;welcome#index&quot;
end
</pre></p>
<h2>Create the consumer</h2>
<p><pre class="brush: bash;">
rails generate oauth_consumer user
rake db:migrate
</pre></p>
<p>in app/controllers/oauth_consumers_controller.rb, replace:</p>
<p><pre class="brush: ruby;">
before_filter :login_required, :only=&gt;:index
</pre></p>
<p>by</p>
<p><pre class="brush: ruby;">
before_filter :authenticate_user!, :only=&gt;:index
</pre></p>
<p>Uncomment the methods for devise (go_back, logged_in? currentuser=, deny_access!) in app/controllers/oauth_consumers_controller.rb.</p>
<p>Add to app/models/user.rb:</p>
<p><pre class="brush: ruby;">
 has_one  :test, :class_name=&gt;&quot;TestToken&quot;, :dependent=&gt;:destroy
</pre></p>
<p>Now go to http://localhost:3000/oauth_clients/ to register your first application with these parameters:</p>
<blockquote><p>Name:                 Test consumer<br />
Main Application URL: http://localhost:4000/<br />
Callback URL:         http://localhost:4000/oauth_consumers/test/callback</p></blockquote>
<p>You&#8217;re redirected to http://localhost:3000/oauth_clients/1. It shows:</p>
<blockquote><p>Consumer Key:      CRcIJ15MwSqlDTxsH8MpO3En4wjaOxkqeofLioH4</p>
<p>Consumer Secret:   C7uci8xkyMShCf4SNXWPclKbBo3ml1Zf2W2XWu4W</p>
<p>Request Token URL: http://localhost:3000/oauth/request_token</p>
<p>Access Token URL:  http://localhost:3000/oauth/access_token</p>
<p>Authorize URL:     http://localhost:3000/oauth/authorize</p></blockquote>
<p>Now, you need to put the key and secret in config/initializers/oauth_consumers.rb:</p>
<p><pre class="brush: ruby;">
 OAUTH_CREDENTIALS={
:test =&gt;{
:key =&gt; &quot;CRcIJ15MwSqlDTxsH8MpO3En4wjaOxkqeofLioH4&quot;,
     :secret =&gt; &quot;C7uci8xkyMShCf4SNXWPclKbBo3ml1Zf2W2XWu4W&quot;,
     :expose =&gt; true
   }
 }
</pre></p>
<p>Create app/models/test_token.rb. This model will store the token for your provider. If you want to provide helpful methods, take inspiration from lib/oauth/models/consumers/services/.</p>
<p><pre class="brush: ruby;">
class TestToken &lt; ConsumerToken
TEST_SETTINGS={
:site =&gt; &quot;http://localhost:3000&quot;,
:request_token_path =&gt; &quot;/oauth/request_token&quot;,
:access_token_path =&gt; &quot;/oauth/access_token&quot;,
:authorize_path =&gt; &quot;/oauth/authorize&quot;
}

def self.consumer(options={})
@consumer ||= OAuth::Consumer.new(credentials[:key], credentials[:secret], TEST_SETTINGS.merge(options))
end

end
</pre></p>
<p>You should now be able to use the URLs &#8220;/oauth_consumers/test/client/&#8221;, &#8220;/oauth_consumers/test/callback&#8221;, &#8220;/oauth_consumers/test/callback2&#8243;,&#8221; /oauth_consumers/test/edit&#8221;,<br />
and &#8220;/oauth_consumers/test&#8221;.</p>
<p>Modify the welcome controller t get the provider data:</p>
<p><pre class="brush: ruby;">
 class WelcomeController &lt; ApplicationController
 def index
 # cf http://oauth.rubyforge.org/rdoc/classes/OAuth/AccessToken.html
 @consumer_tokens=TestToken.all :conditions=&gt;{:user_id=&gt;current_user.id}
 @token = @consumer_tokens.first.client
 logger.info &quot;private data: &quot;+@token.get(&quot;/data/index&quot;).body
 end

end
</pre></p>
<p>To connect a user to an external service link or redirect them to:</p>
<p>/oauth_consumers/[SERVICE_NAME]</p>
<p>Where SERVICE_NAME is the name you set in the OAUTH_CREDENTIALS hash. This will request the request token and redirect the user to the services authorization screen. When the user accepts the get redirected back to:</p>
<p>/oauth_consumers/[SERVICE_NAME]/callback</p>
<h2>That&#8217;s it</h2>
<p>This tutorial is really short, and could be explained a bit more, but I&#8217;ll leave that for another post. You have enough to start tinkering with OAuth. Have fun!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/253/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=253&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/06/28/rails-and-oauth-plugin-part-2-the-consumer/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails and oauth-plugin part 1: the provider</title>
		<link>http://unhandledexpression.com/2011/06/02/rails-and-oauth-plugin-part-1-the-provider/</link>
		<comments>http://unhandledexpression.com/2011/06/02/rails-and-oauth-plugin-part-1-the-provider/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 19:58:14 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=218</guid>
		<description><![CDATA[These days, I have been playing a lot with Oauth and its RoR implementation, oauth-plugin. Its documentation is a bit short, so here is a tutorial to show how to use it, both in provider and consumer mode. And we will even make them communicate with each other. We will now build an Oauth provider [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=218&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These days, I have been playing a lot with Oauth and its RoR implementation, <a title="Oauth-plugin" href="http://code.google.com/p/oauth-plugin/">oauth-plugin</a>. Its documentation is a bit short, so here is a tutorial to show how to use it, both in provider and consumer mode. And we will even make them communicate with each other.</p>
<p>We will now build an Oauth provider using oauth-plugin for authorization and Devise for authentication. And we will add a controller protected by Oauth.</p>
<h2>Starting up</h2>
<p>A few instructions to create the application. You won&#8217;t need an explanation for this:</p>
<p><pre class="brush: bash;">
rails new provider
cd provider
</pre></p>
<p>Put this in your Gemfile:</p>
<p><pre class="brush: ruby;">
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'sqlite3'
gem 'devise'
gem &quot;oauth-plugin&quot;, &quot;&gt;= 0.4.0.pre1&quot;
</pre></p>
<p>And a few more commands:</p>
<p><pre class="brush: bash;">
bundle install
rails generate devise:install
rails generate devise User
rake db:migrate
rails generate controller welcome index
rm public/index.html
</pre></p>
<p>And don&#8217;t forget &#8216;root :to =&gt; &#8220;welcome#index&#8221;&#8216; in config/routes.rb.</p>
<h2>Create the provider</h2>
<p><pre class="brush: bash;">
rails generate oauth_provider oauth

rake db:migrate
</pre></p>
<p>You could put something else than &#8220;oauth&#8221; as parameter, but for the moment, the generator has some bugs (it always generate the class OauthController, but with a different name). I&#8217;ll check more recent versions of the code.</p>
<p>Now, modify config/application.rb and add:</p>
<p><pre class="brush: ruby;">
require 'oauth/rack/oauth_filter'
config.middleware.use OAuth::Rack::OAuthFilter
</pre></p>
<p>Put in app/models/user.rb:</p>
<p><pre class="brush: ruby;">

has_many :client_applications

has_many :tokens, :class_name=&gt;&quot;OauthToken&quot;,:order=&gt;&quot;authorized_at desc&quot;,:include=&gt;[:client_application]

</pre></p>
<p>Put in app/controllers/oauth_controller.rb:</p>
<p><pre class="brush: ruby;">

alias :logged_in? :user_signed_in?

alias :login_required :authenticate_user!

</pre></p>
<p>and uncomment authenticate_user.</p>
<p>Put in app/controllers/oauth_clients_controller.rb:</p>
<p><pre class="brush: ruby;">
alias :login_required :authenticate_user!
</pre></p>
<h2>And now some data</h2>
<p>Create a new controller:</p>
<p><pre class="brush: bash;">

rails generate controller data index

</pre></p>
<p>And now, edit your controller:</p>
<p><pre class="brush: ruby;">
class DataController &lt; ApplicationController
  before_filter :oauth_required

  def index
    @data = { &quot;coincoin&quot; =&gt; &quot;o&lt; o&lt;&quot; }

    respond_to do |format|
      format.json { render :json =&gt; @data }
    end

  end
end
</pre></p>
<h3>UPDATE</h3>
<p>I discovered a few bugs in this tutorial, so here are the fixes.</p>
<p>oauth-plugin needs the function current_user=, so add this to your ApplicationController:</p>
<p><pre class="brush: ruby;">
def current_user=(user)
  current_user = user
end
</pre></p>
<p>Next, to handle revocation, you need to add this to config/routes.rb:</p>
<p><pre class="brush: ruby;">
post 'oauth/revoke'
</pre></p>
<p>And at last, you need to fix the rack filter. The current code doesn&#8217;t verify the token validity, and lets revoked tokens access your data.<br />
You have to modify lib/oauth/rack/oauth_filter.rb in the oauth-plugin gem folder.<br />
Replace the line 46:</p>
<p><pre class="brush: ruby;">
oauth_token = client_application.tokens.first(:conditions=&gt;{:token =&gt; request_proxy.token})
</pre></p>
<p>by</p>
<p><pre class="brush: ruby;">
oauth_token = ClientApplication.find_token(request_proxy.token)
</pre></p>
<h2>And that&#8217;s it!</h2>
<p>You now have a working provider. OauthController handles all the communication with the consumers. OauthClientsController manages the registration of new consumers. They both have customizable views: oauth for the authorization part (for users) and oauth clients for the consumers. And you just need the oauth_required filter to manage access to your data.</p>
<p>And now, you can go to /users/sign_up, then /users/sign_in, then /oauth_clients to register a new client application. You just need to give a name for your application, your URL, and a callback URL.</p>
<p>In the next post, we will build a consumer, and this consumer will access the provider&#8217;s data.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=218&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/06/02/rails-and-oauth-plugin-part-1-the-provider/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>Yet another authentication scheme</title>
		<link>http://unhandledexpression.com/2011/04/01/yet-another-authentication-scheme/</link>
		<comments>http://unhandledexpression.com/2011/04/01/yet-another-authentication-scheme/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 17:05:53 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Reinventing the wheel]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=202</guid>
		<description><![CDATA[Recently, I was asked to design a new authentication protocol for a web service. I know that I shouldn&#8217;t do reinvent the wheel, so I immediatly proposed OAUTH. It turns out that it can&#8217;t be used in this situation. Here are the constraints: -calls to the webservice must be authenticated: I can keep the tokens [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=202&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I was asked to design a new authentication protocol for a web service. I know that I shouldn&#8217;t do reinvent the wheel, so I immediatly proposed OAUTH.  It turns out that it can&#8217;t be used in this situation. Here are the constraints:</p>
<p>-calls to the webservice must be authenticated: I can keep the tokens and signature from OAUTH here. The problem is: how do I get that token?</p>
<p>-calls are made from devices or applications without access to a webbrowser (embedded devices, phones, etc.). The redirection dance of OAUTH is not acceptable here</p>
<p>-communications are done over an untrusted network, without SSL.</p>
<p>-I can&#8217;t use application keys and secrets to encrypt and sign the authentication process: clients include open source software and smartphone applications. You can&#8217;t hide a secret key in these.</p>
<p>-the protocol has to be simple to implement, on a lot of languages</p>
<p>-the server must not store the password in cleartext (I shouldn&#8217;t have to precise this&#8230;), the client must not store the password</p>
<p>Summing it up: no preshared keys, no browser, no SSL, untrusted networks, no passwords stored, and an OAUTH-like environment once the client is authenticated (tokens, authorizations, revoking, etc)</p>
<p>Apparently, I should just give up. But I like to play, so I&#8217;ll try!</p>
<p>First, I must say that I am not an expert in security nor cryptography. But I&#8217;m really enthusiastic about these subjects, and my day job is at a company providing strong authentication solutions (no, this protocol is not related to my day job). So, I know a bit about the subject, and I know that I should ask for reviews, hence this post.</p>
<h2>Rough ideas</h2>
<p>We need a safe communication over an untrusted network. TLS immediatly comes to mind, but the targeted applications might not have access to a TLS implementation. I&#8217;d like to use SRP, but I don&#8217;t think I&#8217;m able to implement it correctly (and it has to be SIMPLE). Using Diffie-Hellman to establish a shared key is another idea, but it is not safe against MITM.</p>
<p>Here&#8217;s my idea: we don&#8217;t need to generate a shared secret, we already have it. It&#8217;s the password!</p>
<p>But how can I use the password if the server doesn&#8217;t store it in cleartext?</p>
<h2>The trick: key derivation functions</h2>
<p>Decveoplers are finally understanding that they should not use MD5 nor SHA1 to store their passwords, even with a salt, because computing power is so cheap these days that anyone could crack easily a lot of passwords.</p>
<p>It is now recommended to use other functrions tro store passwords. The key derivation functions are a class of functions that create a key from a password. Basically, they do it by interating a lot of times. That makes them very slow, which is an interesting property if you want to stpre passwords: it is too expensive to &#8220;crack&#8221; the password. PBKDF2, bcrypt and scrypt are well known  key derivation functions. They&#8217;re simple to use and available in a lot of languages.</p>
<p>With these functions, I can safely store the passwords, and generate a key shared with the client.</p>
<p>In short: if I store kdf(password, N) with N the number of iterations, I can send any M &gt; N to the client and ask him to compute the key, without compromising what I store.</p>
<h2>Designing the protocol</h2>
<p>Now that we have a way to use a shared key, we can look at what will go over the wire to establish it. If I use directly kdf(pass, M), anybody getting access to the client storage will be able to obtain the key for any L &gt; M. So, the key establishment has to use a nonce. That way, the client will only use the password once and forget it, and store the derivated key.</p>
<p>I would rather use a truly random key that has no relation with the password. It could be given to the client, encrypted with the derivated key. The derivated key could then be thrown away. But I still do not know if it is really necesary.</p>
<p>The server still needs to authenticate the client. The client will make a second call to the web service, signing it with HMAC and the key.</p>
<p>That&#8217;s it! It is really simple, so if there are flaws I did not see, you will surely catch them.</p>
<h2>TL; DR</h2>
<p>The protocol is based on key derivation functions, like PBKDF or bcrypt.</p>
<ul>
<li>The server stores login and H = kdf(pass, N), with N integer</li>
<li>The client wants to authenticate and makes a call to the server with the login as argument</li>
<li>The server replies with M &gt; N and i nonce</li>
<li>The client calculates k1 = kdf(kdf(pass, M)+i, 1)</li>
<li>The server calculates k2 = kdf(kdf(H, M-N)+i, 1)</li>
<li>The client calls the server with args &#8220;user=login&amp;sign=&#8221;.HMAC(&#8220;user=login&#8221;, k2)</li>
<li>If k1=k2. The signature matches and the client is authenticated.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=202&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/04/01/yet-another-authentication-scheme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>The Geal test: extending the Joel Test</title>
		<link>http://unhandledexpression.com/2011/02/18/the-geal-test-extending-the-joel-test/</link>
		<comments>http://unhandledexpression.com/2011/02/18/the-geal-test-extending-the-joel-test/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 14:35:00 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[VCS]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=182</guid>
		<description><![CDATA[The Joel test was written by Joel Spolsky to provide a few very simple questions for developers to ask in an interview. Here they are: The Joel Test Do you use source control? Can you make a build in one step? Do you make daily builds? Do you have a bug database? Do you fix [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=182&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a title="Joel on software - the Joel test" href="http://www.joelonsoftware.com/articles/fog0000000043.html" target="_blank">Joel test</a> was written by Joel Spolsky to provide a few very simple questions for developers to ask in an interview. Here they are:</p>
<blockquote><p><strong>The Joel Test</strong></p>
<ol>
<li>Do you use source control?</li>
<li>Can you make a build in one step?</li>
<li>Do you make daily builds?</li>
<li>Do you have a bug database?</li>
<li>Do you fix bugs before writing new code?</li>
<li>Do you have an up-to-date schedule?</li>
<li>Do you have a spec?</li>
<li>Do programmers have quiet working conditions?</li>
<li>Do you use the best tools money can buy?</li>
<li>Do you have testers?</li>
<li>Do new candidates write code during their interview?</li>
<li>Do you do hallway usability testing?</li>
</ol>
</blockquote>
<p>They seem basic, and that&#8217;s the point: a company with a poor score doesn&#8217;t give a nice environment to its developers.</p>
<p>While this test is still applicable, it was written in 2000, and software development has seen a lot of changes and innovation. So, I thought of a few other questions that you can ask your current or future employer:</p>
<blockquote><p><strong>The Geal Test</strong></p>
<ol>
<li>Do you use agile development methods?</li>
<li>Do you have unit tests?</li>
<li>Do you perform code reviews?</li>
<li>Do you use known technologies and frameworks (open source or not)?</li>
<li>Do developers train and learn on office hours, or in their spare time?</li>
<li>Do developers communicate with system administrators (deployment requests and bug reports don&#8217;t count)?</li>
<li>Do developers communicate with the client?</li>
<li>Do developers retain copyright on the work done in their spare time?</li>
</ol>
</blockquote>
<p>That&#8217;s it, 8 more questions, 1 point by positive answer.  Joel said that 11 or 12 for his test is ok. I&#8217;m nicer, so I&#8217;ll say that 6 on my test is good enough.</p>
<h2>1. Do you use agile development methods?</h2>
<p>Agile methods have been there for a few years now, and they have proven useful for a lot of projects, especially when you have changing requirements or a very short time to market. Don&#8217;t let your developers fight everyday against specifications written 5 years ago, let them adapt on the way.</p>
<h2>2. Do you have unit tests?</h2>
<p>This should be standard. There are a lot of libraries to write tests in every language, for specific functions, for APIs, for user interfaces, so this approach is well supported. Moreover, if you answered &#8220;yes&#8221; to Joel&#8217;s question about daily builds, you can add tests to the loop, and run them right after the daily build. If you&#8217;re not convinced about the usefulness of unit tests, or fear that it will take too much time: unit tests give you assurance that you won&#8217;t break the code, they can validate the compliance with the specifications, and automated unit tests will save some time for development. You don&#8217;t want to pay a developer to test manually over and over the same code, but you can buy a machine to do that.</p>
<h2>3. Do you perform code reviews?</h2>
<p>I know that this one is hard to implement in a team, but once the developers are past the &#8220;I&#8217;m too shy to show you my code&#8221; phase, this will help them spot mistakes, learn from the better developers and find new ways to improve the code.</p>
<h2>4. Do you use known technologies and frameworks (open source or not)?</h2>
<p>A lot of companies have custom frameworks that they develop and use for their products, that nobody else uses. Although it can be comforting to have your own technology, that you control and maintain, it has a few problems:</p>
<ul>
<li>it reeks of <a title="Not Invented Here" href="http://en.wikipedia.org/wiki/Not_Invented_Here" target="_blank">NIH syndrome</a></li>
<li>it is a cost not directly linked to what you&#8217;re selling</li>
<li>you have to train developers to use it</li>
<li>the expertise they build will be useless in future jobs</li>
</ul>
<p>If you use known (and hopefully, recent) technologies, you don&#8217;t have to maintain it (although you may need to pay for it), you profit from bugfixes for other clients, and you are more likely to attract and hire skilled developers. Seriously, I don&#8217;t want to waste years to maintain your dead framework.</p>
<h2>5. Do developers train and learn on office hours, or in their spare time?</h2>
<p>Software development moves very fast and a developer needs to catch up often. If you don&#8217;t allocate time in his schedule to read, try and learn, you can still assume that he will still train himself in his spare time. But you take the risk that your Java developer becomes a Ruby expert, because he will learn what he wants, not what you need. If you want your developers to become experts, help them.</p>
<h2>6. Do developers communicate with system administrators (deployment requests and bug reports don&#8217;t count)?</h2>
<p>Too often, the only communication between developers and tech ops is through deployment request and bug reports. The consequence: they don&#8217;t know each other, they don&#8217;t trust each other, and when there&#8217;s a problem, they don&#8217;t work together. Obviously, this is not a good work environment. As a developer, I&#8217;m interested in how my code behaves in real conditions, and I would like helpful bug reports, instead of &#8220;it doesn&#8217;t work, I rollback&#8221;, and knowing and working with the sys admins can provide it.</p>
<h2>7. Do developers communicate with the client?</h2>
<p>Ok, this one will horrify some project managers and a few developers. I know that you want  to control all the interactions with the client, and that developers sometimes have poor communication skills. But if you put a few layers between the developer and the client, this is what the developer will see: specifications that don&#8217;t make sense, and useless bug reports. Developers are problem analysis machines, so they can understand the needs of your client, and see right away what is implied in architecture, technology and performance. Use their insight, and they will feel useful, and produce better software. Also, if you can, send a developer to watch a  bit how the client works with the software. In 5 minutes, they will spot more bugs and usability problems than in 5 weeks of bug reports.</p>
<h2>8. Do developers retain copyright on the work done in their spare time?</h2>
<p>When you&#8217;re passionate about development, you often have ideas, itches to scratch, and you may not be able to develop them at work. But a lot of contracts have non competition clauses and other clauses giving copyright of ALL your work to the employer. As an employer, it&#8217;s a way to protect the company, but as a developer, it is scary: you can&#8217;t use or sell the code written in your spare time. Let your developers work on what they want when they&#8217;re not in the office, and you will profit from the experience they gained developing their side projects (but state clearly that they work for you on office hours).</p>
<h2>Bonus</h2>
<p>I also have 4 bonus questions. They&#8217;re optional, but they don&#8217;t hurt.</p>
<ul>
<li>Do the developers participate in &lt;LANGUAGE&gt; user groups or developer meetups? In these meetups, they will learn a lot, and if they&#8217;re experts and enjoy working for you, they will attract other developers.</li>
<li>Will I have a technical manager? It is reassuring for a developer to know that his manager has a clue about development, knows the difference between a good and a bad developer, can understand his problems and stabd up for his team.</li>
<li>Do you use a recent version control software? Joel already asked this, but it needs to be precised. Version control systems have improved a lot since his test so, if you can, avoid old stuff like CVS or (worse) SourceSafe. Subversion is fine for most setups now (even on <a title="TortoiseSVN" href="http://tortoisesvn.net/" target="_blank">Windows</a>), and if you use Git or Mercurial, I will be reaaaally happy.</li>
<li>Do you accept remote working? There are a lot of tools to communicate online: mail, IM, VoIP, web project managers and bug trackers, and developers often know very well how to use them. It&#8217;s comforting for the employer to know that the developer is always at arm&#8217;s length, but this will not mean they&#8217;re more productive. If you remove distractions from the work environment (phone, colleagues), the developer can be more productive (yes, there are actually LESS distractions at home). Also, they won&#8217;t waste time in transport.</li>
</ul>
<p>Now, if you&#8217;re a developer, rate your own company or future job. If you&#8217;re a manager, rate your team, and please, please, on behalf of all the developers out there, try to get the perfect score!</p>
<p>How much did you get?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=182&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/02/18/the-geal-test-extending-the-joel-test/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>Smalltalk for engineers</title>
		<link>http://unhandledexpression.com/2011/02/04/smalltalk-for-engineers/</link>
		<comments>http://unhandledexpression.com/2011/02/04/smalltalk-for-engineers/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 15:14:58 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[smalltalk]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=68</guid>
		<description><![CDATA[For more than a year, I have been playing with Smalltalk, and more specifically the Pharo project, and I had a lot of fun! Now, I&#8217;d like to share this experience. I saw a lot of introductions to Smalltalk, but they were all about its amazing features from a CS point of vue. I&#8217;m a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=68&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For more than a year, I have been playing with Smalltalk, and more specifically the <a title="Pharo, an open source Smalltalk" href="http://pharo-project.org" target="_blank">Pharo project</a>, and I had a lot of fun! Now, I&#8217;d like to share this experience. I saw a lot of introductions to Smalltalk, but they were all about its amazing features from a CS point of vue. I&#8217;m a software engineer, so I&#8217;ll give you a more pragmatic look, with a few useful tips.</p>
<p>When you hear about Smalltalk, you imagine old bearded guys, clinging to their outdated language. In reality, this is what I saw: a small yet growing community full of nice and motivated people, enjoying development and innovating everyday. Even if the language is old, they&#8217;re keeping it up to date with today&#8217;s standards: JIT compiling, web development, iPhone port&#8230; I strongly encourage you to take a look and, maybe, participate!</p>
<h2>First look: the interface</h2>
<p>The first impression is the most shocking: you don&#8217;t understand what you can/should do with that empty window. It is not the code editor you would expect. It is an entire world, full of living objects. The behaviour of these objects is described by code, but they&#8217;re not programs with a beginning and an end. For a good impression of that, try closing the environment (don&#8217;t forget to save) and starting it again: your windows are still open, exactly in the same place! Even selected text is still there! Your object&#8217;s life doesn&#8217;t end when you close the environment: they&#8217;re serialized in the image file.</p>
<p><a href="http://unhandledexpression.files.wordpress.com/2011/02/pharo-firstscreen.jpg"><img class="aligncenter size-medium wp-image-164" title="pharo-firstscreen" src="http://unhandledexpression.files.wordpress.com/2011/02/pharo-firstscreen.jpg?w=300&#038;h=205" alt="" width="300" height="205" /></a></p>
<p>The environment is composed of a virtual machine executing the code, an image file containing the objects, and a source file, storing a part of the source code. And that&#8217;s all. No files.</p>
<p><strong>UPDATE: </strong>the <a href="http://smalltalk.gnu.org/" target="_blank">GNU Smalltalk</a> environment uses files to store source code.</p>
<p>In the previous picture, you will see the code browser, used for everyday development. It doesn&#8217;t display files, but (from left to right) categories, classes, method categories, methods, and under that, the actual code for the method. The code editor is organized around the actual structure of the code, not some arbitrary folder tree. It can be confusing at first, but it&#8217;s actually quite elegant. There&#8217;s a drawback though: you can&#8217;t use your favorite code editor to write Smalltalk code. Another nice side effect of the image: I store my environment on a USB key, and can use it to work seamlessly on Windows, Mac and Linux (using the <a title="Download the one click pharo image" href="http://gforge.inria.fr/frs/download.php/28015/Pharo-1.1.1-OneClick.zip">one click pharo image</a>).</p>
<h2>Second look: the language</h2>
<p>The language itself is another surprise: what are those ifTrue and whileTrue? You can&#8217;t think that Smalltalk has a syntax used for control flow.  In Smalltalk, everything is an object. And the primary way of interacting with an object is sending it a message. The whole syntax of Smalltalk revolves around messages:</p>
<ul>
<li>&#8220;1+2/3&#8243; is not equal to 5/3, but to 1, because you send to 1 the message &#8220;+&#8221; with argument 2, which gives you 3, and you send this result the message &#8220;/&#8221; with argument 3.</li>
<li>ifTrue is a message sent to a boolean, with a &#8220;block&#8221; as argument (a block is a piece of code). The block will be executed if the boolean is an instance of True.</li>
<li>you can&#8217;t access directly the members of an object: you need to create messages to read and modify these members.</li>
</ul>
<p>The methods are separated between the class side and the instance side. The classes are objects, so they have their own methods (think of it as static methods). They&#8217;re used for a lot of things, like generating common instances (String crlf, Color blue, etc), or starting servers.</p>
<p>If you take a good look at a class like string, you will spot apparently redundant methods like displayOn:, displayOn:at:, displayAt:, displayOn:at:textColor:. They&#8217;re not redundant: displayOn calls displayOn:at:, which calls displayOn:at:textColor:. This is actually very elegant, because it keeps methods small and readable.</p>
<p>Keep that in mind when you&#8217;re developing in Smalltalk: readability is more important that speed, because the time you gain now will be wasted the next time you try to read your code.</p>
<h2>Next: the tools</h2>
<p>You saw the code browser, but there are other nice tools designed to help you every day.</p>
<p>Monticello is a distributed versioning system integrated in the environment. Nothing special here: it tracks your changes, create revisions, and supports local (folders) and remote (HTTP, FTP) repositories.</p>
<p>There is a test runner that displays all the tests loaded in your environment. You will see that there is a very good coverage, but it is not enough! Contribute a test or two if you have time.</p>
<p>Last but not least: the refactoring browser. It is an amazing piece of code which analyzes your classes, points out design mistakes, and in some cases, can correct them in your place.</p>
<h2>OK, now, what can I develop?</h2>
<p>You can do about anything in Smalltalk, like other languages: desktop applications, web applications, use databases, network protocols, REST APIs&#8230; It is particularly suited for big applications with complex object models.</p>
<p>For desktop applications, you will easily have cross platform code and UI, but you won&#8217;t be able to use native windows (at least, not with Squeak or Pharo). For web applications, you can choose between these frameworks: <a href="http://www.seaside.st">Seaside</a>, <a href="http://www.iliadproject.org">Iliad</a> and <a href="http://www.aidaweb.si/">Aida</a>. Each one has a different philosophy, and different strengths, so try them all out!</p>
<p>Developing in Smalltalk has been an amazing experience: I learned a lot, and the concepts and habits I took are easily applied to other languages. now, I just need a way to work in Smalltalk for my day job <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=68&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2011/02/04/smalltalk-for-engineers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>

		<media:content url="http://unhandledexpression.files.wordpress.com/2011/02/pharo-firstscreen.jpg?w=300" medium="image">
			<media:title type="html">pharo-firstscreen</media:title>
		</media:content>
	</item>
		<item>
		<title>Gorgeous spammer wants to add you as a friend</title>
		<link>http://unhandledexpression.com/2010/11/16/gorgeous-spammer-wants-to-add-you-as-a-friend/</link>
		<comments>http://unhandledexpression.com/2010/11/16/gorgeous-spammer-wants-to-add-you-as-a-friend/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 10:40:01 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[social networks]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook messages]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=141</guid>
		<description><![CDATA[Yesterday was introduced the new Facebook Messages interface. Huzzah! You get an @facebook.com email address, unification of IM and email, conversation history, etc. That sounds cool! And what is that new feature called &#8220;social inbox&#8221;? That&#8217;s nice, messages from your friends will be prioritized and appear directly in your inbox, and other emails will go [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=141&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Yesterday was introduced the<a title="The Facebook blog" href="http://blog.facebook.com/blog.php?post=452288242130" target="_blank"> new Facebook Messages interface</a>. Huzzah! You get an @facebook.com email address, unification of IM and email, conversation history, etc. That sounds cool! And what is that new feature called &#8220;social inbox&#8221;? That&#8217;s nice, messages from your friends will be prioritized and appear directly in your inbox, and other emails will go to the &#8220;others&#8221; box. Wait, what?</p>
<p style="text-align:justify;">This feature is meant to help you <del>waste time</del> connect efficiently with your network. I won&#8217;t go into the analysis of how your email contacts are not always friends, even the important and regular ones, how will Google react, or how will we send emails with no subject line. I&#8217;m sure someone will talk about that at length. Instead, let&#8217;s talk about these nice people always interested in becoming our friends, sell us cheap software enlarge our <del>pe</del> bank account: spammers.</p>
<p style="text-align:justify;">In the old world of regular email (yes, old, we&#8217;re in Web 2.0, Gmail is soooo last week), we had spam filters. <a title="WP: Antispam techniques" href="http://en.wikipedia.org/wiki/Anti-spam_techniques" target="_blank">A lot of methods</a> were developed to protect us: blacklistingm whitelisting, greylisting, bayesian filters, SMTP verification, CAPTCHAs, etc. They&#8217;re not all efficient, but services like Gmail are really good at catching unwanted email. Spamming is an activity with a very low conversion rate: you have to send thousands of emails just to get one gullible person to click and buy. Thankfully, emails are cheap to send. But we could improve that conversion rate. Facebook just did it.</p>
<blockquote><p>With new Messages, your Inbox will only contain messages from your friends and their friends. All other messages will go into an Other folder where you can look at them separately.</p></blockquote>
<p style="text-align:justify;">Put you in situation. A gorgeous woman/man/<a href="http://en.wikipedia.org/wiki/On_the_Internet,_nobody_knows_you're_a_dog" target="_blank">dog</a> wants to be your friend on Facebook. Will you accept her/him? Let&#8217;s say she has more or less the same tastes has you (that&#8217;s surprinsingly easy to get the list of a band&#8217;s fans, same for book, political views, etc). Not yet? Let&#8217;s say you have friends more gullible than you. The hot woman is a friend of another friend and sends you a message in these terms: &#8220;Hi! We met at &lt;gullible friend&gt;&#8217;s party a few months ago, I had a really good time talking to you&#8221;. You just accepted the friend request, admit it. And a few days/weeks later, she will begin sending you messages about great opportunities like ponzi schemes or nigerian scams. And YOU WILL CLICK! Because it will appear directly in your inbox. Because it comes from one of your friends, someone you more or less trust.</p>
<p style="text-align:justify;">Facebook just gave spammers a direct access to your inbox, and offered them targeted advertising, thanks to all the groups, likes, music and book fan groups. Spammers are considered dumb, because they automate a lot. But thanks to Facebook&#8217;s social features, they will learn to customize the mails, just for you. They will pay cheap workers to talk to you through the fake accounts, they will get you, your friends and your family, and will be a part of your great friends network.</p>
<p style="text-align:justify;">Thanks to Facebook.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=141&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2010/11/16/gorgeous-spammer-wants-to-add-you-as-a-friend/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
		<item>
		<title>Update to a safer VLC</title>
		<link>http://unhandledexpression.com/2010/08/27/update-to-a-safer-vlc/</link>
		<comments>http://unhandledexpression.com/2010/08/27/update-to-a-safer-vlc/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 14:37:32 +0000</pubDate>
		<dc:creator>Géal</dc:creator>
				<category><![CDATA[VideoLAN]]></category>
		<category><![CDATA[binary planting]]></category>
		<category><![CDATA[DLL hijacking]]></category>
		<category><![CDATA[DLL preloading]]></category>
		<category><![CDATA[vlc]]></category>
		<category><![CDATA[vulnerabilities]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://unhandledexpression.com/?p=137</guid>
		<description><![CDATA[VLC 1.1.4 is out, with a fix for the DLL preloading attack! Read more about that issue in the release notes and the security advisory.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=137&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>VLC 1.1.4 is out, with <a href="http://git.videolan.org/?p=vlc/vlc-1.1.git;a=commit;h=43a31df56c37bd62c691cdbe3c1f11babd164b56">a fix</a> for the <a href="http://unhandledexpression.com/2010/08/23/fixing-the-dll-loading-vulnerability/">DLL preloading attack</a>!</p>
<p>Read more about that issue in the <a href="http://www.videolan.org/vlc/releases/1.1.4.html">release notes</a> and the <a href="http://www.videolan.org/security/sa1005.html">security advisory</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unhandledexpression.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unhandledexpression.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unhandledexpression.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unhandledexpression.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unhandledexpression.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unhandledexpression.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unhandledexpression.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unhandledexpression.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unhandledexpression.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unhandledexpression.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unhandledexpression.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unhandledexpression.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unhandledexpression.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unhandledexpression.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unhandledexpression.com&amp;blog=11260360&amp;post=137&amp;subd=unhandledexpression&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://unhandledexpression.com/2010/08/27/update-to-a-safer-vlc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ed9901b9b80743c05aedf58b4f4926dd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Géal</media:title>
		</media:content>
	</item>
	</channel>
</rss>
