<?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>Yet another web log &#187; Programming</title>
	<atom:link href="http://blog.philippheckel.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.philippheckel.com</link>
	<description>Life, Linux and other things</description>
	<lastBuildDate>Thu, 17 Mar 2011 10:04:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hacking Flash Applications and Games: A Case Study</title>
		<link>http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/</link>
		<comments>http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 06:00:40 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[SWF]]></category>
		<category><![CDATA[SWF Decompiler]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/?p=674</guid>
		<description><![CDATA[Adobe&#8217;s proprietary Flash format has become a significant part of the Internet as it is today. While its importance in Web applications is slowly decreasing due to Web 2.0 technologies and HTML5, it is still a major player in the browser game and application sector. The majority of these games and applications are for entertainment [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe&#8217;s proprietary Flash format has become a significant part of the Internet as it is today. While its importance in Web applications is slowly decreasing due to Web 2.0 technologies and HTML5, it is still a major player in the browser game and application sector. The majority of these games and applications are for entertainment only and offer you nothing but a nice rank in the high score. On rare occasions, however, there are Flash games in which you can actually win something valuable such as concert tickets or even money. And of course there are applications that let you stream, but not download content from a website.</p>
<p>So what&#8217;s the problem with that, you think? The problem is that almost <strong>all Flash applications can be hacked</strong> very easily and most developers are not aware of that. </p>
<p>As a reminder of how vulnerable Flash applications are, this post aims to raise awareness for these issues. In a case study, it shows how a Flash-based game and its server side high score can be tricked within a few minutes using free tools only.</p>
<p><span id="more-674"></span></p>
<hr />
<div class="toc">
<ol>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Disclaimer">Disclaimer</a></li>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Introduction">1. Introduction</a>
<ol>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#The-problem-with-Flash-applications">1.1. The problem with Flash applications</a></li>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Checksums-as-a-solution">1.2. Checksums as a solution?</a></li>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Tools-and-basic-approach">1.3. Tools and basic approach</a></li>
</ol>
</li>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Case-study-a-car-parking-game">2. Case study: a car parking game (with high score)</a>
<ol>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Capture-the-client-server-communication">2.1. Capture the client-server communication</a></li>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Decompile-the-SWF-file-and-find-the-checksum-algorithm">2.2. Decompile the SWF file and find the checksum algorithm</a></li>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Write-a-script">2.3. Write a script</a></li>
</ol>
</li>
<li><a href="http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/#Conclusion">3. Conclusion</a></li>
</ol>
</div>
<hr />
<h3 id="Disclaimer" >Disclaimer</h3>
<p>This post is meant to raise awareness for the vulnerabilities of Flash-based applications. It is not a hacking tutorial or how-to. For that reason, I will not describe all steps in great detail, but only sketch the basic steps.</p>
<h3 id="Introduction" >1. Introduction</h3>
<h4 id="The-problem-with-Flash-applications" >1.1. The problem with Flash applications</h4>
<p>Flash applications are similar to normal Windows/Linux executables: Like normal programs, their source code is compiled to a binary format and later executed on the client machine. The major difference to .exe or Linux binaries is that decompiling is a lot easier: while a C or C++ compiler translates the source code into machine code, i.e. CPU instructions, SWF files contain the ActionScript code in plain text. That is with the right tools, <strong>extracting the complete code is a no-brainer</strong>!</p>
<p>Combining this with the fact that <strong>sniffing into the client-server communication</strong> is also not the most difficult task, one can easily simulate the Flash client with own code snippets and scripts, and thereby send <strong>forged requests</strong> to the server.</p>
<h4 id="Checksums-as-a-solution" >1.2. Checksums as a solution?</h4>
<p>Most application developers at least know that the client-server communication can be sniffed into. As an attempt to make it more difficult for people to send forged requests to the server, applications mostly use a message authentication code (MAC) or some other checksum-based mechanism. So instead of sending a plain text update query to the server (1), the application creates a hash by concatenating the user input with (to the user unknown) other data (2):</p>
<table style="width: 90%; margin: 5px auto; line-height: 130%" border="0">
<tr class="toprow">
<td style="width: 50%; text-align: left; font-size: 12px; padding: 5px">(1) Without checksum mechanism</td>
<td style="width: 50%; text-align: left; font-size: 12px; padding: 5px">(2) With checksum mechanism</td>
</tr>
<tr class="odd">
<td style='width: 50%; vertical-align: top; text-align: left; font-size: 12px; padding: 5px'>
<b>POST</b> /write-highscore.php <b>HTTP/1.1</b><br />
<b>Host</b>: www.example.com<br />
<b>User-Agent</b>: Mozilla/5.0 &#8230;<br />
&#8230;<br />
name=Phil&#038;score=40
</td>
<td style='width: 50%; vertical-align: top; text-align: left; font-size: 12px; padding: 5px'>
<b>POST</b> /write-highscore.php <b>HTTP/1.1</b><br />
<b>Host</b>: www.example.com<br />
<b>User-Agent</b>: Mozilla/5.0 &#8230;<br />
&#8230;<br />
name=Phil&amp;score=40&amp;<span style="color: red; font-weight: bold">check=283647a&#8230;</span>
</td>
</tr>
</table>
<p>This mechanism is completely based on the fact that the user does not know how the checksum is created. While this approach is very effective in regular applications, it completely fails in Flash programs: disassembling a Windows or Linux binary is very difficult and requires know how in assembler. Decompiling SWF files, however, is fairly easy and can be done in under a minute. That is retrieving the code that generates the checksum is only a matter of seconds.</p>
<h4 id="Tools-and-basic-approach" >1.3. Tools and basic approach</h4>
<p>The following steps present a generic approach on how any Flash application can be exploited like described above. </p>
<p><strong>Required Tools</strong>:</p>
<ul>
<li><a href="https://addons.mozilla.org/en-us/firefox/addon/firebug/">Firebug</a>: Firefox plugin for basic communication sniffing</li>
<li><a href="http://www.sothink.com/product/flashdecompiler/">Sothink Flash Decompiler</a>: required to extract ActionScript code (trial version is sufficient)</li>
<li><a href="http://www.wireshark.org/">Wireshark</a>: required for detailed communication sniffing (byte-for-byte)</li>
</ul>
<p><strong>Generic Approach</strong>:</p>
<ol>
<li>Enable Firebug and start sniffing with Wireshark.</li>
<li>Go to the target web site and play the game or use the application.</li>
<li>Look at the communication of the Flash application with the server. If there are any parts of the requests that cannot be recreated without the source code, e.g. checksums, download the important SWF files and decompile them.</li>
<li>Analyze the ActionScript code and find the part which creates the checksum.</li>
<li>Make a script that generates the same request with arbitrary input data, e.g. any score or name. For this script, the checksum algorithm from the ActionScript code can be used (or recreated).</li>
</ol>
<h3 id="Case-study-a-car-parking-game" >2. Case study: a car parking game (with high score)</h3>
<p>Our local newspaper <a href="http://www.morgenweb.de/">Mannheimer Morgen</a> recently hosted a competition in which users had to park a (virtual) car into different parking spots without damaging the car and with minimal fuel usage. Prizes were a safety training and concert tickets. While in this case the score of the participants did not decide who won (winners were drawn by lot), the winner in other competitions might be the one with the best score. <em>Please note that I did not take part in this competition and I did under no circumstances try to win the prizes.</em></p>
<p><img src="http://blog.philippheckel.com/wp-content/uploads/2011/02/parking-screenshot.png" alt="" title="parking-screenshot" width="450" height="349" class="aligncenter size-full wp-image-729" style="border: 0" /></p>
<p style="text-align: center; font-size: .8em; line-height: 115%"><strong>Parking Game</strong>: The target application in this case is a game called &#8220;Parking&#8221;.</p>
<h4 id="Capture-the-client-server-communication" >2.1. Capture the client-server communication</h4>
<p>Following the instructions from above, the first step is to capture the communication between the Flash client and the server. In this case, we are particularly interested in how to <strong>add our name with an arbitrary score to the high score list</strong>.</p>
<p><strong>Firebug</strong>:<br />
Using Firebug, we can see three interesting requests: </p>
<ul>
<li><em>savescore.swf</em> is the part of the client that is responsible for sending the score to the server.</li>
<li><em>serverdate-read.php</em> is called by savescore.swf for no obvious reason &#8211; very suspicious. We will later see that the result is used in the checksum generation.</li>
<li><em>highscore-write.php</em> is also called by savescore.swf and actually writes the user&#8217;s score to the database on the server.</li>
</ul>
<p><img src="http://blog.philippheckel.com/wp-content/uploads/2011/02/firebug.png" alt="" width="500" height="399" class="aligncenter size-full wp-image-735" /></p>
<p style="text-align: center; font-size: .8em; line-height: 115%"><strong>Firebug</strong> identifies the interesting files and requests.<br />In this case, three requests are relevant for the high score forgery.</p>
<p>What is particularly important is the two parameters <b>__ctrl</b> and <b>controlvalue</b>. Both are obviously generated by some checksum function in the <em>savescore.swf</em>-file. So the next step is to decompile the SWF file and look for the checksum-generating function.</p>
<p><strong>Wireshark</strong>:<br />
If we additionally enable Wireshark, we can get a plain text (or hex) representation of the HTTP request-response cycle. That is particularly important if one wants to forge a request in a way that it cannot be detected by the server. </p>
<h4 id="Decompile-the-SWF-file-and-find-the-checksum-algorithm" >2.2. Decompile the SWF file and find the checksum algorithm</h4>
<p>Using the SWF Decompiler software (trial version is sufficient), the <em>savescore.swf</em> can be examined very closely. Most of the applications are not very complex and the relevant code pieces are found very easily.</p>
<p><img src="/wp-content/uploads/2011/02/swfdecompile.png" alt="" width="500" height="334" class="aligncenter size-full wp-image-742" /></p>
<p>When analyzing <em>savescore.swf</em>, the two parts in which the checksums are created are found at different positions in the file. The <b>__ctrl</b> parameter is generated by taking a MD5 hash over the two concatenated values of <em>score</em> and <em>email</em>. The <b>controlvalue</b> parameter is created in a similar fashion and involves the previously queried <em>serverdate</em>.</p>
<p><img src="/wp-content/uploads/2011/02/checksum1.png" alt="" width="491" height="197" class="aligncenter size-full wp-image-740" /></p>
<p style="text-align: center; font-size: .8em; line-height: 115%">The <b>__ctrl</b> parameter is a hash value over two of the variable input parameters.<br />The <b>controlvalue</b> parameter is created similarly.</p>
<h4 id="Write-a-script" >2.3. Write a script</h4>
<p>Once it is clear how the checksums are generated, the puzzle is solved. The only thing left is to write a script that allows entering arbitrary input values, and using the previously determined checksum-mechanisms to generate a MAC.</p>
<p>Here is a short excerpt of how this could look like (using PHP):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$score</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;999.999&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$email</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;nobody@example.com&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">&quot;__ctrl&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$score</span><span style="color: #339933;">.</span><span style="color: #000088;">$email</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
	<span style="color: #339933;">...</span>
	<span style="color: #0000ff;">&quot;score&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$score</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;controlvalue&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">...</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
	<span style="color: #339933;">...</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span> 
	<span style="color: #000088;">$data_enc</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;POST /parking/highscore-write.php HTTP/1.1<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
     <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;Host: www.morgenweb.de<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
     <span style="color: #339933;">...</span>
     <span style="color: #339933;">.</span> <span style="color: #990000;">join</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$data_enc</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fsockopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;www.morgenweb.de&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">80</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$line</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgets</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span>	
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3 id="Conclusion" >3. Conclusion</h3>
<p>This blog post introduced a common way to outsmart Flash applications and games. It demonstrated that by sniffing into client-server communication and decompiling SWF files, many Flash applications can be misused. Using the example of a Flash game, the post showed that SWF cannot be compared to Windows/Linux binaries, but must rather be seen as JavaScript-like client code. </p>
<p>Even though this post only demonstrated this using a rather harmless game, more serious misuse is also possible. Flash-based music streaming sites such as <a href="http://www.simfy.com/">Simfy</a>, <a href="http://www.spotify.com/">Spotify</a> <a href="http://www.grooveshark.com/">Grooveshark</a> are affected as well. They all use a similar mechanism for their Flash-based music player. Using the approach presented above combined with tools like <em>rtmpdump</em> can potentially harm their services significantly.</p>
<p>Flash once was a great way for bringing a little dynamic in the Web 1.0, but is no outdated. With various JavaScript frameworks and HTML5 on the way, Flash is going to retire soon. Developers and companies must be aware of the flaws of Flash and adjust their services accordingly to make sure that they cannot be misused.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2011/03/01/hacking-flash-games-a-case-study/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Altering old SVN revisions: removing confidental data from a Subversion repository</title>
		<link>http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/</link>
		<comments>http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 11:26:44 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/?p=588</guid>
		<description><![CDATA[Version control systems like CVS or Subversion are designed for keeping track of the changes of a project and for having the possibility to revert to old revisions if something goes wrong. In contrast to regular relational databases, these systems are made only for adding new content to a repository, and not for removing data [...]]]></description>
			<content:encoded><![CDATA[<p>Version control systems like <a href="http://www.nongnu.org/cvs/">CVS</a> or <a href="http://subversion.apache.org/">Subversion</a> are designed for keeping track of the changes of a project and for having the possibility to revert to old revisions if something goes wrong. In contrast to regular relational databases, these systems are made only for adding new content to a repository, and not for removing data from it. In fact, deleting old content is <a href=" http://subversion.apache.org/faq.html#removal">not a built-in functionality</a> in SVN, and mostly requires removing entire revisions from the repository or even <a href="http://svnbook.red-bean.com/en/1.1/ch05s03.html#svn-ch-5-sect-3.1.3">creating a new one</a>. </p>
<p>But what happens if you <strong>accidentally commit a password</strong> or other sensitive information to a repository? This post explains <strong>how to remove this confidential data</strong> permanently from the repository by simply overwriting it in old revisions, i.e. without having to remove revisions or create a new repository.</p>
<p><span id="more-588"></span></p>
<hr />
<b>Contents</b></p>
<div class="toc">
<ol>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Introduction">1. Introduction</a></p>
<ol>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Disclaimer">1.1. Disclaimer</a></li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Requirements">1.2. Requirements</a></li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Example-Scenario">1.3. Example Scenario</a></li>
</ol>
</li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Local-machine-Identify-the-affected-revisions-in-the-working-copy">2. Local machine: Identify the affected revisions in the working copy</a>
<ol>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Fix-and-commit-the-affected-file">2.1. Fix and commit the affected file</a></li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Identify-the-affected-file-versions-locally">2.2. Identify the affected file versions locally</a></li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Get-MD5-checksums-of-the-affected-versions">2.3. Get MD5 checksums of the affected versions</a></li>
</ol>
</li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#SVN-repository-Correct-the-affected-files">3. SVN repository: Correct the affected files</a>
<ol>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Make-a-repository-backup">3.1. Make a repository backup</a></li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Verify-affected-versions">3.2. Verify affected versions</a></li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Replace-the-password-and-checksums">3.3. Replace the password and checksums</a></li>
</ol>
</li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Test-locally">4. Test locally</a></li>
<li><a href="http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/#Bash-history-cleanup">5. Bash history cleanup</a></li>
</ol>
</div>
<hr />
<h3 id="Introduction" >1. Introduction</h3>
<h4 id="Disclaimer" >1.1. Disclaimer</h4>
<p>The following actions might lead to data loss. I am not responsible for anything that goes wrong because of my description. </p>
<h4 id="Requirements" >1.2. Requirements</h4>
<p>It is absolutely necessary to have <strong>root access to the SVN respository</strong>. That is not only through the svnadmin command, but full command line access to the files, particularly to the &#8220;repos&#8221; directory.</p>
<p>If you do not have root access to the repository, you cannot remove any data from the repository! In that case, contact your SVN administrator.</p>
<h4 id="Example-Scenario" >1.3. Example Scenario</h4>
<p>For this example, let&#8217;s assume you accidentally committed the file <strong>config.cfg</strong> with a plain text password <em style="color: red">123secret</em> a while ago (in <strong>revision 12</strong>). The repository is currently at <strong>revision 25</strong> and you just realized that the password was in there all the time:</p>

<div class="wp_syntax"><div class="code"><pre class="config" style="font-family:monospace;"># Config file &quot;config.cfg&quot;
username = someone
password = 123secret
...</pre></div></div>

<h3 id="Local-machine-Identify-the-affected-revisions-in-the-working-copy" >2. Local machine: Identify the affected revisions in the working copy</h3>
<h4 id="Fix-and-commit-the-affected-file" >2.1. Fix and commit the affected file</h4>
<p>The following commands are performed on <strong>your local machine</strong> within the working copy of the project, i.e. on the client machine.</p>
<p>Before we start tinkering and forging the SVN history and its repository, first fix the affected file and commit a new revision to the repository. In most cases, people are not going to look in old revisions of a config file, so the faster you commit a new version, the less likely it is that someone sees it!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Dev<span style="color: #000000; font-weight: bold;">/</span>yourproject
$ <span style="color: #c20cb9; font-weight: bold;">vi</span> config.cfg
<span style="color: #666666; font-style: italic;"># Change password to something else</span>
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;config update&quot;</span>
...
Transmitting <span style="color: #c20cb9; font-weight: bold;">file</span> data .
Committed revision <span style="color: #000000;">26</span>.</pre></div></div>

<h4 id="Identify-the-affected-file-versions-locally" >2.2. Identify the affected file versions locally</h4>
<p>In most cases you will probably realize right away that you just committed something confidential to the SVN repository. In this case, you only have to fix one single version of that file and is pretty clear which revision is affected.</p>
<p>In other cases, however, the affected file might be in the repository for many revisions before you realize it. If this is the case, there might be multiple revisions of the file in the repository and each of these versions needs to be fixed. To identify the possibly affected versions of the file, you can peak into the logs:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">svn</span> log config.cfg
<span style="color: #660033;">------------------------------------------------------------------------</span>
r22 <span style="color: #000000; font-weight: bold;">|</span> someone <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">2011</span>-01-<span style="color: #000000;">25</span> 01:<span style="color: #000000;">36</span>:<span style="color: #000000;">12</span> +0100 <span style="color: #7a0874; font-weight: bold;">&#40;</span>Tue, <span style="color: #000000;">25</span> Jan <span style="color: #000000;">2011</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">1</span> line
&nbsp;
update xy config
<span style="color: #660033;">------------------------------------------------------------------------</span>
r12 <span style="color: #000000; font-weight: bold;">|</span> someone <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">2011</span>-01-05 00:<span style="color: #000000;">45</span>:<span style="color: #000000;">19</span> +0100 <span style="color: #7a0874; font-weight: bold;">&#40;</span>Wed, 05 Jan <span style="color: #000000;">2011</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">1</span> line
&nbsp;
added connection details to config
<span style="color: #660033;">------------------------------------------------------------------------</span>
...</pre></div></div>

<p>In this case, the file has been altered in the two <strong>revisions 12 and 22</strong>. Both <strong>might</strong> include the password and are stored in the repository, i.e. both potentially need to be corrected.</p>
<h4 id="Get-MD5-checksums-of-the-affected-versions" >2.3. Get MD5 checksums of the affected versions</h4>
<p>SVN ensures the integrity of its repository by saving MD5 checksums of all the files and its versions. Since it is now clear which revisions might be affected, you need to get the <em>current</em> checksums of these file versions and calculate checksums for the new <em>corrected</em> (&#8220;forged&#8221;) versions. In short, you need to do the following <strong>for each affected version</strong>:</p>
<ul>
<li>Retrieve the version and calculate its MD5 checksum</li>
<li>Make a copy of file, replace the confidential information with &#8220;x&#8221;s and calculate the MD5 checksum of the new file.</li>
<li>Remember or copy all the checksums and versions into a file.</li>
</ul>
<p>In this example, we&#8217;ll have to get the checksums for revisions 12 and 22 of the <em>config.cfg</em>-file. The code below only shows what to do for revision 22; revision 12 is analogue:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Get current checksum of revision 22</span>
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #660033;">--revision</span> <span style="color: #000000;">22</span> config.cfg
...
At revision <span style="color: #000000;">22</span>.
$ md5sum config.cfg
0e28c6c8342649c290400567130f657b  config.cfg
&nbsp;
<span style="color: #666666; font-style: italic;"># Correct the file and get new checksum</span>
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> config.cfg <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>config.cfg-<span style="color: #000000;">22</span>
$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>config.cfg-<span style="color: #000000;">22</span>
<span style="color: #666666; font-style: italic;"># Overwrite the password with &quot;xxxxxxxxx&quot; (same length as the old password!!)</span>
$ md5sum <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>config.cfg-<span style="color: #000000;">22</span>
459a78e2eae02b28f810f9fdebdc5b52  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>config.cfg-<span style="color: #000000;">22</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Repeat this for revision 12</span></pre></div></div>

<h3 id="SVN-repository-Correct-the-affected-files" >3. SVN repository: Correct the affected files</h3>
<div style="border: 1px solid red; background: #fcc; padding: 5px; margin-top: 8px"><strong>Warning</strong>: This step can damage your repository, so make sure you backup as described in 3.1. before you change anything.</div>
<p>In this step, we finally start altering the repository. All the actions are performed on <strong>the server machine</strong> as <strong>root</strong> user inside the actual SVN repository directory, so be sure not to confuse it with you local machine.</p>
<h4 id="Make-a-repository-backup" >3.1. Make a repository backup</h4>
<p>Creating some sort of backup is crucial, since we are about to change the binary revision files of the Subversion repository. The easiest way to do this is to backup the whole repository folder of your project, e.g. /path/to/svn/repos/yourproject. However, if its total size is too big you can also choose to only backup the files identified in 3.2.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Make backup of project; Note the &quot;-a&quot; parameter to keep the permissions.</span>
$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>backups
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>yourproject <span style="color: #000000; font-weight: bold;">/</span>backups</pre></div></div>

<h4 id="Verify-affected-versions" >3.2. Verify affected versions</h4>
<p>After the backup, we need to verify that we really need to change all the versions we identified earlier. To do that, navigate to the &#8220;revs&#8221; folder inside the repository and grep for the password:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>yourproject<span style="color: #000000; font-weight: bold;">/</span>db<span style="color: #000000; font-weight: bold;">/</span>revs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>
$ <span style="color: #c20cb9; font-weight: bold;">grep</span> 123secret <span style="color: #000000; font-weight: bold;">*</span>
Binary <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000;">12</span> matches
Binary <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000;">22</span> matches</pre></div></div>

<p>The matching files are the revisions that contain the password, and hence also the files that need to be &#8220;corrected&#8221;. Note that sometimes not all the versions identified through the &#8220;svn log&#8221; command appear in this list. That is because when the file is simply moved and not changed or other parts of it were altered, its contents will not be stored in the SVN revision file.</p>
<h4 id="Replace-the-password-and-checksums" >3.3. Replace the password and checksums</h4>
<p>Since the SVN revision files are binary, we need a hex editor to edit them. Hence install hexedit, and then simply replace the password and checksums like identified before:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> hexedit
&nbsp;
$ hexedit <span style="color: #000000;">22</span>
<span style="color: #666666; font-style: italic;"># Hex editor opens the file for revision 22</span>
<span style="color: #666666; font-style: italic;"># Replace passwords and checksums</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Repeat this for revision 12</span></pre></div></div>

<p>Hexedit is not the easiest editor to use. So here is a step-by-step of what you need to do:</p>
<ul>
<li>Hit TAB, then CTRL-S to search</li>
<li>Enter the password <em style="color: red">123secret</em> and hit return</li>
<li>Overwrite the password with <em style="color: red">xxxxxxxxx</em> (same length!)</li>
<li>Hit CTRL-S, then &#8220;Y&#8221; to save</li>
<li>Repeat 1-4 for each occurance of the password.</li>
<li>Do the same for the old checksum &#8220;0e28c6c8342649c290400567130f657b&#8221;, and replace it with the new one &#8220;f85abfd8b63fa7ab68abc9364f2d339e&#8221;</li>
<li>Hit CTRL-X to quit</li>
<li>Repeat this for all affected revisions</li>
</ul>
<p>That&#8217;s the complete magic. If checked out, the revisions 12 and 22 (and of course also their succeeding versions) will show <em style="color: red">xxxxxxxxx</em> instead of the initially committed password.</p>
<h3 id="Test-locally" ">4. Test locally</h3>
<p>Now test locally if you can switch between revisions and every works without error messages:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #660033;">--revision</span> <span style="color: #000000;">12</span> update
...
At revision <span style="color: #000000;">12</span>.
$ <span style="color: #c20cb9; font-weight: bold;">grep</span> password config.cfg
password = xxxxxxxxx</pre></div></div>

<p>If you did everything as the tutorial says, you shouldn&#8217;t get any errors. If you forgot to replace checksums or you changed something that you weren&#8217;t supposed to change in the SVN revision file, you might get an error like below. However, if that happens, you can always go back to your backup and try it again&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #660033;">--revision</span> <span style="color: #000000;">12</span> update
<span style="color: #c20cb9; font-weight: bold;">svn</span>: Checksum mismatch <span style="color: #000000; font-weight: bold;">while</span> reading representation:
   expected:  f85abfd8b63fa7ab68abc9364f2d339e
     actual:  de6f581d115197baebc43c3975b9e396</pre></div></div>

<h3 id="Bash-history-cleanup" >5. Bash history cleanup</h3>
<p>In step 3.2. we typed the plain text password in the bash. As you might know, this leaves traces in the ~/.bash_history file. Delete them by opening the files and then by simply removing the according lines. Make sure that you <strong>do not use the search</strong> function of VIM, since that has a history on its own. If you do, delete the history of VIM in ~/.viminfo.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">vi</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_history
<span style="color: #666666; font-style: italic;"># Remove everything that contains the password</span>
<span style="color: #666666; font-style: italic;"># Do NOT use the search function, but search manually!</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2011/02/01/altering-old-svn-revisions-removing-confidental-data-from-subversion-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aware Context API (ACAPI) &#8211; Using the sensors in Java ME</title>
		<link>http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/</link>
		<comments>http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 05:43:33 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java ME]]></category>
		<category><![CDATA[Symbian]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/?p=481</guid>
		<description><![CDATA[The capabilities of cell phones increased dramatically in the last few years. While in the old days most mobile phones were primarily used to make phone calls, modern smart-phones are mostly all-round devices. With the possibility of accessing the Internet and the availability of various sensors (e.g. location or noise), mobile applications have become interactive [...]]]></description>
			<content:encoded><![CDATA[<p>The capabilities of cell phones increased dramatically in the last few years. While in the old days most mobile phones were primarily used to make phone calls, modern smart-phones are mostly all-round devices. With the possibility of accessing the Internet and the availability of various sensors (e.g. location or noise), mobile applications have become interactive and flexible. The trend towards location-based services and context-awareness allows applications to react on their surroundings and to behave intuitively towards the user.</p>
<p>For developers, context-awareness can be both a blessing and a curse. While the mobile operating systems iPhone OS and Android come with relatively good sensor-support, the vast majority of devices deal with Java ME&#8217;s basic and heterogeneous sensor functionalities.</p>
<p>The <strong>Aware Context API (ACAPI)</strong> aims to bridge this gap by providing a framework for building context aware applications for mobile devices based on Java ME. In this article, I&#8217;d like to introduce ACAPI, its structure and usage briefly. Please feel free to comment.</p>
<p><span id="more-481"></span></p>
<hr />
<b>Contents</b></p>
<div class="toc">
<ol>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Motivation-and-Goals">1. Motivation and Goals</a></li>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Development-Team-and-Scope">2. Development Team and Scope</a></li>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Aware-Context-API-ACAPI">3. Aware Context API (ACAPI)</a>
<ol>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#ACAPI-Structure">3.1. ACAPI Structure</a></li>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Implemented-Sensors">3.2. Implemented Sensors</a></li>
</ol>
</li>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Example-Usage">4. Example Usage</a>
<ol>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Example-Scenario-and-Code">4.1. Example Scenario and Code</a></li>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Proof-of-Concept-Application">4.2. Proof-of-Concept Application</a></li>
</ol>
</li>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Future-Work-and-Conclusion">5. Future Work and Conclusion</a></li>
<li><a href="http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/#Download-and-License">A. Download and License</a></li>
</ol>
</div>
<hr />
<h3 id="Motivation-and-Goals" >1. Motivation and Goals</h3>
<p>ACAPI is designed to allow easy and homogeneous access to the different sensors of the mobile device. It creates an abstraction between the available sensors and their usage so that developers can focus on the business logic rather than on how to use the sensor implementations.</p>
<blockquote><p><em>Example:</em> A mobile application shall notify the user if another (previously defined) person comes into his or her range, e.g. if the boss arrives at the office.</p></blockquote>
<p>Using the standard Java ME interfaces, developers have to get to know the different APIs and write a lot of code to solve this or similar problems. In this use case, the application needs to determine its position (<em>the office</em>), monitor the available devices around it (<em>the phone of the boss</em>) and be able to notify the user when both events occur. </p>
<p>The Aware Context API aims to solve this reoccurring problem with an easy-to-use event-based framework that allows defining <em>rules</em> for available sensor data. Using ACAPI, the given example can be solved easily by defining a <em>rule</em> and an <em>action</em> that is triggered when the rule matches:</p>
<ul>
<li><strong>Rule</strong>: Wi-Fi &#8220;OfficeWLAN&#8221; available <em>AND</em> Bluetooth device &#8220;BossPhone&#8221; available</li>
<li><strong>Action</strong>: Notify user, e.g. by playing a sound</li>
</ul>
<h3 id="Development-Team-and-Scope" >2. Development Team and Scope</h3>
<p>The ACAPI project was developed within the scope of a team project as part of the curriculum of a Master of Science Degree at the <a href="http://www.uni-mannheim.de/">University of Mannheim</a>. The project was a team-effort, carried out over a 1-year duration at the <a href="http://wifo1.bwl.uni-mannheim.de/">Chair of Business Administration and Information Systems</a>, under the supervision of <a href="http://wifo1.bwl.uni-mannheim.de/heinzl.html">Prof. Armin Heinzl</a> and his research assistants <a href="http://wifo1.bwl.uni-mannheim.de/hemmer.html">Erik Hemmer</a> and <a href="http://wifo1.bwl.uni-mannheim.de/stuckenberg.html">Sebastian Stuckenberg</a>. </p>
<p>The project team consisted of <a href="https://www.xing.com/profile/Lars_Bakker">Lars Bakker</a>, <a href="https://www.xing.com/profile/Philipp_Heckel">Philipp Heckel</a> (myself), <a href="https://www.xing.com/profile/Obie_Modisane">Obie Modisane</a>, <a href="https://www.xing.com/profile/Benjamin_Schubert13">Benjamin Schubert</a> and <a href="https://www.xing.com/profile/Moritz_Waechter2">Moritz Wächter</a>.</p>
<h3 id="Aware-Context-API-ACAPI" >3. Aware Context API (ACAPI)</h3>
<p>The Aware Context API is well-structured and is very easy to understand. It is easily extendible and supports a broad range of devices. It is mainly based on Java ME, but has native parts whenever needed (e.g. for Wi-Fi, battery or telephony). </p>
<h4 id="ACAPI-Structure" >3.1. ACAPI Structure</h4>
<p>ACAPI is horizontally structured into 3 different layers:</p>
<ul>
<li><strong>Sensor</strong>: On the lowest level, the <em>sensors</em> gather data about the current status and context of the phone. A Wi-Fi sensor, for instance, collects available devices and it issues an event whenever the data changes. Applications can either hook themselves directly into the sensor events or use higher abstractions (conditions and rules).</li>
<li><strong>Condition</strong>: In order to evaluate a single sensor, <em>conditions</em> compare the sensor&#8217;s properties to given values. They can become either <em>true</em> or <em>false</em>. A location condition, for example, becomes <em>true</em> if the phone gets into the range of certain coordinates. Similar to a sensor, a condition issues an event when the value changes (from <em>true</em> to <em>false</em>, or vice versa).</li>
<li><strong>Rule</strong>: To express more than one condition, <em>rules</em> can combine conditions to a more complex logical expression. In the above example, the rule only matches if both conditions match (&#8220;in the office&#8221; and &#8220;boss phone available&#8221;).</li>
</ul>
<p><img src="http://blog.philippheckel.com/wp-content/uploads/2010/08/acapi-structure.png" alt="" title="ACAPI structure" class="aligncenter size-full wp-image-503" style="border: none" /></p>
<p style="font-size: .8em; line-height: 115%"><strong>ACAPI Structure</strong> (simplified and incomplete!): The Aware Context API is layer-based. Each of the components is easily extendible and has event listeners to react on changes. This chart shows the interdependence of the different layers.</p>
<p>Using this layered structure, ACAPI fundamentally changes the development strategy of mobile applications. Instead of predefining a screen and/or process flow, applications are <strong>event-driven</strong>. Whenever a rule changes its state (match vs. no match), the application can react by displaying a different screen, notifying the user, or by performing other actions.</p>
<p>Besides the horizontal division, the API is also vertically divided in the two logical parts <em>Boolean</em> and <em>Fuzzy</em>. While the Boolean part assumes correct sensors, the Fuzzy conditions and rules take measurement errors and inaccuracy into account. While the Boolean conditions and rules can only become <em>true</em> or <em>false</em>, their Fuzzy counterparts implement a score-based system that only triggers when a certain threshold is reached. This is particularly relevant for sensors that supply accuracy data, e.g. GPS sensors.</p>
<h4 id="Implemented-Sensors" >3.2. Implemented Sensors</h4>
<p>The current code base of ACAPI includes several predefined sensors, including the most common: Bluetooth and GPS. Most sensors are entirely based on Java ME and will work on any phone that supports the corresponding JSR. However, since Java ME does not provide access to some functionalities, a few native implementations are required (e.g. for Wi-Fi, battery status or telephony status). </p>
<p>The following sensors are already implemented:</p>
<ul>
<li><strong>Battery Sensor</strong> (native S60): This sensor monitors the status of the battery (%) and the charger (enum value, e.g. on-battery, or plugged-in). There is currently only a Symbian S60 implementation for this sensor since Java ME does not allow access to the battery data.</li>
<li><strong>Bluetooth Sensor</strong>: This sensor monitors available devices, e.g. phones or laptops. It can react on joining or leaving devices. </li>
<li><strong>Custom Sensor</strong>: This sensor allows the integration of business logic in ACAPI, so that rules do not only include actual sensor data, but also virtual business sensor data.</li>
<li><strong>Location Sensor</strong> (GPS and Wi-Fi; partially native S60): This sensor monitors the position and the speed. It uses GPS and Wi-Fi triangulation to get a fast and accurate position. Since Java ME does not allow access to the wireless sensor, the Wi-Fi part is native S60 code.</li>
<li><strong>Noise Level  Sensor</strong>: This sensor monitors the noise level (<em>in decibels</em>) of the surrounding area.</li>
<li><strong>Time Sensor</strong>: This sensor delivers the current time and can react on date and time changes.</li>
<li><strong>Wireless Sensor</strong> (native S60): This sensor monitors the available Wi-Fi devices, i.e. access points. It can react on joining and leaving devices. In combination with a web service, it can be used to estimate the position. </li>
</ul>
<p>There are many other possible sensors that could be implemented using the available abstract classes. Examples include an orientation sensor (<em>react on device movement</em>) or a telephony sensor (<em>react on calls, SMS etc.</em>).</p>
<h3 id="Example-Usage" >4. Example Usage</h3>
<p>Having discussed the structure of the Aware Context API, the following section elaborates the above-mentioned example even further. It explains the scenario and shows specific example code.</p>
<h4 id="Example-Scenario-and-Code" >4.1. Example Scenario and Code</h4>
<p>As already briefly mentioned above, the example scenario for demonstrating the API is very simple: The application shall display a warning message and play a warning sound when the boss arrives at the office. </p>
<p><img src="/wp-content/uploads/2010/08/acapi-usecase.png" alt="" title="Use Case" width="500" height="205" class="aligncenter size-full wp-image-493" style="border: none" /></p>
<p>The two conditions depicted in the diagram above are combined in one Boolean rule, i.e. the rule only becomes <em>true</em> if both of the conditions match.</p>
<p>Similar to the API concept, its actual usage is also very simple. The following code snippet shows how to implement the above example in a regular Java ME application.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Conditions</span>
Condition inOffice <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WirelessNearCondition<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;OfficeWLAN&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Condition bossPhone <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> BluetoothNearCondition<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BossPhone&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// The two conditions create one rule</span>
Rule bossDetectionRule <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> BooleanRule<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
bossDetectionRule.<span style="color: #006633;">addCondition</span><span style="color: #009900;">&#40;</span>inOffice<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
bossDetectionRule.<span style="color: #006633;">addCondition</span><span style="color: #009900;">&#40;</span>bossPhone<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// React when the rule matches</span>
bossDetectionRule.<span style="color: #006633;">addRuleListener</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> RuleListener<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> ruleChanged<span style="color: #009900;">&#40;</span>Rule rule, <span style="color: #000066; font-weight: bold;">boolean</span> matches<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>matches<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        playWarningSound<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        displayWarningMessage<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Warning: boss has arrived!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Activate rule</span>
bossDetectionRule.<span style="color: #006633;">setActive</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In lines 2-3, the specific conditions are created. Since both conditions represent very generic cases (Bluetooth/WLAN device in range), ACAPI provides predefined conditions for them. In cases where more complex tests are desired, conditions can be extended via simple Java inheritance. Lines 6-8 combine the two conditions to a single Boolean rule, i.e. a rule that becomes either <em>true</em> or <em>false</em> depending on the status of its conditions. Since the application is supposed to react on changes in this particular rule, it registers itself as a listener in lines 11-17. When the rule is activated (line 20), it tells its conditions to register themselves at the corresponding sensors, which in turn get activated (if not already running). After this initialization, ACAPI notifies all registered listeners whenever the rule changes.</p>
<p>Depending on the status of the rules and conditions, i.e. on the device context, the application can change its appearance, behavior or internal state. In this case, it only plays a warning sound and displays a warning message (lines 14-15).</p>
<h4 id="Proof-of-Concept-Application" >4.2. Proof-of-Concept Application</h4>
<p>In order to test the implemented sensors and the rules engine of ACAPI, we developed a proof-of-concept application that implements a more sophisticated context driven use case.</p>
<p>A field service automation application that reacts upon the context the worker is in at the moment. This can be nicely done with the ACAPI and has a value for businesses. However, as this part of our project is not open source, I will not go into more detail here. </p>
<h3 id="Future-Work-and-Conclusion" >5. Future Work and Conclusion</h3>
<p>The Aware Context API provides a framework for building context-aware applications for mobile devices based on Java ME. By providing uniform interfaces to different sensors, the library allows the development of context-driven applications.</p>
<p>The idea and structure of ACAPI are very solid, however, the actual implementation is in a very early development stage. While most sensors and Boolean conditions/rules are already working on the test devices, the Fuzzy conditions and rules are yet to be implemented. The native part only covers Symbian S60 so far and lacks of stability. Hence, the future work will include the implementation of missing parts, testing as well as the documentation. </p>
<h3 id="Download-and-License" >A. Download and License</h3>
<p>ACAPI will be released as open source, possibly under GPL or a Creative Commons license. Since we have not finished cleaning up the code and commenting everything, the code is not available for download as yet. </p>
<p>However, since it will be open source anyway, I will give out the code upon request.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2010/08/22/aware-context-api-acapi-using-the-sensors-in-java-me/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>KadS: a secure version of the Kademlia protocol</title>
		<link>http://blog.philippheckel.com/2009/03/16/kads-a-secure-version-of-the-kademlia-protocol/</link>
		<comments>http://blog.philippheckel.com/2009/03/16/kads-a-secure-version-of-the-kademlia-protocol/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 15:56:40 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Distributed Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Kademlia]]></category>
		<category><![CDATA[Peer-to-Peer]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2009/03/16/kads-a-secure-version-of-the-kademlia-protocol/</guid>
		<description><![CDATA[There are various peer-to-peer protocols out there. All of them focus the decentralisation of storage and other system resources. Most implement a distributed hash table (DHT) to store information. That is, each node of the network only holds a small part of the hash table but is able to locate and retrieve any requested entry. [...]]]></description>
			<content:encoded><![CDATA[<p>There are various peer-to-peer protocols out there. All of them focus the decentralisation of storage and other system resources. Most implement a distributed hash table (DHT) to store information. That is, each node of the network only holds a small part of the hash table but is able to locate and retrieve any requested entry. <a href="http://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf">Kademlia</a>, a protocol designed by two <a href="http://www.nyu.edu/">NYU</a> students in 2002, is one of them.</p>
<p><span id="more-21"></span></p>
<h3 id="toc-the-kademlia-protocol">The Kademlia Protocol</h3>
<p>Kademlia is based on four simple remote procedure calls (RPCs) and guarantees a very fast and lightweight exchange of information by using the connection-less UDP instead of TCP. Every node as well as every entry of the DHT is tagged with an identifier, called <em>node ID</em> or <em>key</em>. By XORing identifiers, one can calculate the distance between them and is hence able to walk through the network knowing whether one is near or far to a specific node. This so called <em>XOR metric</em> makes it possible to group the entries of the DHT around the K closest nodes to the entry&#8217;s key. An entry with the key 10, for instance, will be stored at the nodes with a node ID close to 10.</p>
<h3 id="toc-kademlia-pki-kads-the-secure-extension">Kademlia + PKI = KadS: The Secure Extension</h3>
<p>In my Bachelor thesis, I am going to extend Kademlia from a simple peer-to-peer protocol to a <em>trusted</em> and <em>secure</em> network. The proposed KadS network is almost identical to the Kademlia network, i.e. it consists of the described RPCs and implements the same XOR metric. The major extension to the protocol is that every node is equipped with a public/private key-pair signed by a trusted CA. This extends the normal Kademlia network to a public key infrastructure (PKI) in which every communication is encrypted, every node can be trusted and only verified nodes can participate in the network.</p>
<p>Every connection is synchronously encrypted with a session key which is created and exchanged in a handshake procedure when two nodes first meet. That is, a node has a different session key for the connection with each node it knows in the network. The handshake is similar to the one used in other software except for the fact that both clients exchange their public key and need to verify each others identity. After a successful handshake, two nodes are able to exchange lightweight encrypted messages using the session key and the basic protocol applies</p>
<h3 id="toc-an-application-the-distributed-url-blacklisting-service">An application: The distributed URL blacklisting service</h3>
<p>As an application to the proposed KadS network, I chose a distributed URL blacklisting service. Please read more in my <a href="/uploads/2009/03/kads-url-blacklisting-2009-thesis-expose.pdf">Bachelor thesis exposé</a>, or simply download the whole thesis: </p>
<p><a href="/uploads/2009/05/Blacklisting-Malicious-Web-Sites-using-a-Secure-Version-of-the-DHT-Protocol-Kademlia.pdf">Blacklisting Malicious Web Sites using a Secure Version of the DHT Protocol Kademlia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2009/03/16/kads-a-secure-version-of-the-kademlia-protocol/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Roundcube login via PHP script</title>
		<link>http://blog.philippheckel.com/2008/05/16/roundcube-login-via-php-script/</link>
		<comments>http://blog.philippheckel.com/2008/05/16/roundcube-login-via-php-script/#comments</comments>
		<pubDate>Fri, 16 May 2008 00:44:04 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Roundcube]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/05/16/roundcube-login-via-php-script/</guid>
		<description><![CDATA[Roundcube is an AJAX/PHP based e-mail application which is really flexible and easy to use in comparison to other free web based solutions. For the customer interface of Silversun, I wanted to use RC as the internal web mail application and therefore had to embed it into my system. To avoid that the customer has [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.roundcube.net/">Roundcube</a> is an AJAX/PHP based e-mail application which is really flexible and easy to use in comparison to other free web based solutions. </p>
<p>For the customer interface of <a href="http://www.silversun.de/">Silversun</a>, I wanted to use RC as the internal web mail application and therefore had to embed it into my system. To avoid that the customer has to log in twice (customer interface and Roundcube), I had to simulate the login request with a PHP script.</p>
<p><span id="more-4"></span></p>
<h3 id="toc-updates">Updates</h3>
<p><strong>November 2008</strong>: After the comment of <a href="#comment-1171">Matias</a>, I reviewed the code and fixed some issues. Now it should work properly even with the newest Roundcube version (0.2-beta). The class file itself contains installation instructions. Please read them carefully.</p>
<p><strong>March 2009</strong>: Just tested the script with version 0.2.1 and it works like a charm, at least for my installation.</p>
<p><strong>December 2009</strong>: <a href="#comment-13861">Diego</a> just confirmed (via e-mail) that the script also works for 0.3.1 without modification. </p>
<p><strong>May 2010</strong>: I just tested the scripts with Roundcube 0.4-beta, and it still works without modification. I also added the section <a href="#Debugging">Debugging</a> make it easier to figure out what&#8217;s wrong.</p>
<p><strong>March 2011</strong>: After <a href="#comment-19140">Alex&#8217; comment</a>, I adjusted a small part of the script. It should now also work with Roundcube 0.5.1. It now handles the new request token correctly. The pre-0.5.1 script is still available for download here: <a href="/uploads/2008/05/RoundcubeLogin.pre-0.5.1.class.phps">RoundcubeLogin.pre-0.5.1.class.php</a></p>
<h3 id="toc-prepare-rc">Prepare RC</h3>
<p>To perform the Roundcube login via a web site, it is necessary to turn off the <em>check_ip/ip_check</em> option in the <em>main.inc.php</em> file, because our script (= server IP address) will send the login data and pass it to RC instead of the user&#8217;s browser (= user IP address). </p>
<h3 id="toc-the-roundcubelogin-class">The RoundcubeLogin class</h3>
<p>This small class only consists of four functions and it shouldn&#8217;t be necessary to modify it in order to get the login to work.</p>
<ul>
<li><a href="http://blog.philippheckel.com/uploads/2008/05/RoundcubeLogin.class.phps">RoundcubeLogin.class.php</a><br />Provides the functionality to login, logout and check the login status.</li>
<li><a href="http://blog.philippheckel.com/uploads/2008/05/rclogin.phps">rclogin.php</a><br />A small script to test if everything works as expected.</li>
</ul>
<p>The class provides four public methods:</p>
<ul>
<li>
  <strong>login($username, $password)</strong><br />
  Perform a login to the Roundcube mail system.<br />
  <u>Note</u>: If the client is already logged in, the script will re-login the user (logout/login). To prevent this behaviour, use the <em>isLoggedIn()</em>-function.<br />
  <u>Returns</u>: <em>TRUE</em> if the login suceeds, <em>FALSE</em> if the user/pass-combination is wrong<br />
  <u>Throws</u>: May throw a <em>RoundcubeLoginException</em> if Roundcube sends an unexpected answer (that might happen if a new Roundcube version behaves differently)
</li>
<li>
  <strong>isLoggedIn()</strong><br />
  Checks whether the client/browser is logged in and has a valid Roundcube session.<br />
  <u>Returns</u>: <em>TRUE</em> if the user is logged in, <em>FALSE</em> otherwise.<br />
  <u>Throws</u>: May also throw a <em>RoundcubeLoginException</em> (see above).
</li>
<li>
  <strong>logout()</strong><br />
  Performs a logout on the current Roundcube session.<br />
  <u>Returns</u>: <em>TRUE</em> if the logout was a success, <em>FALSE</em> otherwise.<br />
  <u>Throws</u>: May also throw a <em>RoundcubeLoginException</em> (see above).
</li>
<li>
  <strong>redirect()</strong><br />
  Simply redirects to Roundcube.
</li>
</ul>
<h3 id="toc-sample-usage">Sample usage</h3>
<p>The script below demonstrates how the class can be used. If the client is already logged in, it simply redirects the browser to the Roundcube application. If not, it performs a login and then redirects to Roundcube.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #b1b100;">include</span> <span style="color: #0000ff;">&quot;RoundcubeLogin.class.php&quot;</span><span style="color: #339933;">;</span>	
&nbsp;
<span style="color: #666666; font-style: italic;"># Create RC login object.
</span><span style="color: #666666; font-style: italic;"># Note: The first parameter is the URL-path of the RC inst.,
</span><span style="color: #666666; font-style: italic;">#       NOT the file-system path
</span><span style="color: #666666; font-style: italic;"># e.g. http://host.com/path/to/roundcube/ --&gt; &quot;/path/to/roundcube&quot;
</span><span style="color: #000088;">$rcl</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RoundcubeLogin<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/roundcube/&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$debug</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
try <span style="color: #009900;">&#123;</span>
   <span style="color: #666666; font-style: italic;"># If we are already logged in, simply redirect
</span>   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$rcl</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isLoggedIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #000088;">$rcl</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">redirect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># If not, try to login and simply redirect on success
</span>   <span style="color: #000088;">$rcl</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">login</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;some-email-address&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;plain-text-password&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$rcl</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isLoggedIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #000088;">$rcl</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">redirect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># If the login fails, display an error message
</span>   <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ERROR: Login failed due to a wrong user/pass combination.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
catch <span style="color: #009900;">&#40;</span>RoundcubeLoginException <span style="color: #000088;">$ex</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;ERROR: Technical problem, &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$ex</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$rcl</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dumpDebugStack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3 id="Debugging" >Debugging</h3>
<p>If you&#8217;re having problems with the <a href="/uploads/2008/05/RoundcubeLogin.class.phps">RoundcubeLogin.class.php</a> class itself, try using the <a href="/uploads/2008/05/rclogin.phps">rclogin.php</a>-file for debugging: open the file in your browser (http://myhost/roundcube/rclogin.php), and take a look at the output. The <tt>RoundcubeLogin</tt>-class performs a series of request/response cycles and parses the output to figure out if you&#8217;re logged in. </p>
<p>Known issues:</p>
<ol>
<li><b>No Roundcube installation found at &#8216;&#8230;&#8217;</b><br />
   This error message is thrown if the path-value in the <tt>RoundcubeLogin</tt> constructur was not set correctly. It must be set to the part of the URL that represents the path, e.g. in case of http://myhost/roundcube/ you must create the object like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$rcl</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RoundcubeLogin<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/roundcube/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li><b>Unable to determine login-status due to technical problems.</b><br />
  This error can occur in the methods login(), logout() and isLoggedIn(). The <tt>RoundcubeLogin</tt>-class expects Roundcube to send certain headers in response to the login/logout-requests. If those headers could not be found, this error is thrown. Possible reasons are: </p>
<ul>
<li>New RC version</li>
<li>Cookies must be enabled</li>
<li><em>ip_check/check_ip</em> option in the <em>main.inc.php</em> must be <tt>false</tt></li>
</ul>
</li>
<li><b>Unable to determine the login status. Unable to continue due to technical problems.</b><br />
  This error occurs if the script cannot determine if you are logged in or not, because the returned HTML code neither contains the login-form (= logged out) nor the message DIV (= logged in). This might happen if Roundcube changed the HTML-code.</li>
</ol>
<h3 id="toc-im-open-for-suggestions">I&#8217;m open for suggestions</h3>
<p>Please feel free to post your comment or suggestions. That&#8217;s the only way to ensure that it works with all versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/05/16/roundcube-login-via-php-script/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
	</channel>
</rss>

