<?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>Guy Rutenberg &#187; Uncategorized</title>
	<atom:link href="http://www.guyrutenberg.com/category/Uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Sat, 14 Jan 2012 11:30:25 +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>The annoying eBook vs. Paperback Pricing</title>
		<link>http://www.guyrutenberg.com/2011/12/30/the-annoying-ebook-vs-paperback-pricing/</link>
		<comments>http://www.guyrutenberg.com/2011/12/30/the-annoying-ebook-vs-paperback-pricing/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 10:17:24 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Kindle]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=949</guid>
		<description><![CDATA[I&#8217;m an avid Kindle user for more than a year. However once in a while, I come across something like this when I shopping for a new book: As you can see, Amazon sells Kindle edition for higher price than a paperback. This book of course isn&#8217;t the only example for this ridiculous pricing method, and if [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m an avid Kindle user for more than a year. However once in a while, I come across something like this when I shopping for a new book:</p>
<p><a href="http://www.guyrutenberg.com/wp-content/uploads/2011/12/screenshot_ebook_price.png"><img class="aligncenter size-medium wp-image-950" title="screenshot_ebook_price" src="http://www.guyrutenberg.com/wp-content/uploads/2011/12/screenshot_ebook_price-300x228.png" alt="" width="300" height="228" /></a></p>
<p>As you can see, Amazon sells Kindle edition for higher price than a paperback. This book of course isn&#8217;t the only example for this ridiculous pricing method, and if one browses the Kindle store he will surely find more.</p>
<p>This really upsets me, as there is no honest reason to price an electronic edition higher than a real dead-tree paper edition. In both cases, the author and the publisher get their royalities and share of the profits. But the Kindle editions doesn&#8217;t have many related expenses, like storage, transportation (from the publisher to Amazon), and above all printing costs.</p>
<p>I don&#8217;t know who is to blame for this absurd thing, Amazon or the publisher (or even both). But the few things I know are that this bad for everyone, the customer because he pays more and Amazon/publisher as in the long run, this encourages piracy as the customer feels he&#8217;s being unfairly treated thus he will be more willing to play an unfair game as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2011/12/30/the-annoying-ebook-vs-paperback-pricing/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using gitg without installing</title>
		<link>http://www.guyrutenberg.com/2011/12/10/using-gitg-without-installing/</link>
		<comments>http://www.guyrutenberg.com/2011/12/10/using-gitg-without-installing/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 21:54:31 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gitg]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=922</guid>
		<description><![CDATA[I&#8217;m working on adding spell checking support to gitg. If you intend to use gitg without installing it, a little hack is necessary. You&#8217;ll need to symlink the gitg directory (the one with the source files) as ui. ln -s gitg ui ./configure /pathto/below/gitg The reason is that gitg will look for Glade UI files [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on adding spell checking support to <a href="http://git.gnome.org/browse/gitg/">gitg</a>. If you intend to use gitg without installing it, a little hack is necessary. You&#8217;ll need to symlink the <code>gitg</code> directory (the one with the source files) as <code>ui</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ln -s gitg ui
./configure /pathto/below/gitg</pre></div></div>

<p>The reason is that <code>gitg</code> will look for Glade UI files under <code>$(datadir)/gitg/ui</code> and in gitg&#8217;s source the UI files are in the <code>gitg</code> directory and not in <code>ui</code>.</p>
<p><a href="http://www.guyrutenberg.com/wp-content/uploads/2011/12/gitg-spellchecking.png"><img src="http://www.guyrutenberg.com/wp-content/uploads/2011/12/gitg-spellchecking.png" alt="" title="gitg-spellchecking" width="525" height="410" class="aligncenter size-full wp-image-923" /></a></p>
<p>You can see above a screenshot of <code>gitg</code> with spell checking enabled. Hopefully I&#8217;ll be done with the changes soon and they will be merged to upstream quickly.</p>
<p>Update: There are couple more things to do in order to get gsettings&#8217; schemas right.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mkdir glib-2.0
ln -s ../data glib-2.0/schemas
glib-compile-schemas data/
XDG_DATA_DIRS=&quot;.:/usr/share/&quot; ./gitg/gitg</pre></div></div>

<p>For the schemas thing see <a href="http://developer.gnome.org/gio/2.31/glib-compile-schemas.html">glib-compile-schemas</a>&#8216; man page.</p>
<p>Update 2011-12-17: Jesse (gitg&#8217;s maintainer) hasn&#8217;t responded to my email regarding the new feature, so I&#8217;ve open a bug (<a href="https://bugzilla.gnome.org/show_bug.cgi?id=666406">#666406</a>) for it. If you&#8217;re willing to try the changes yourself, you can pull them from <code>git://github.com/guyru/gitg.git spellchecker</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2011/12/10/using-gitg-without-installing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modified Variant Whitespace Template</title>
		<link>http://www.guyrutenberg.com/2011/11/17/modified-variant-whitespace-template/</link>
		<comments>http://www.guyrutenberg.com/2011/11/17/modified-variant-whitespace-template/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 19:16:47 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=889</guid>
		<description><![CDATA[Variant Whitespace is a nice minimalistic template by Andreas Viklund. Andreas chose to put the sidebar above the content, which I prefer not to do. Furthermore as the sidebar was a &#8220;float&#8221; that came before the content, it caused additional inconveniences. E.g. if you had an element with clear: both it would be pushed bellow [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://andreasviklund.com/templates/variant-whitespace/">Variant Whitespace</a> is a nice minimalistic template by <a href="http://andreasviklund.com/">Andreas Viklund</a>.</p>
<p><a href="http://www.guyrutenberg.com/wp-content/uploads/2011/11/variant-whitespace-700x549.png"><img src="http://www.guyrutenberg.com/wp-content/uploads/2011/11/variant-whitespace-700x549.png" alt="" title="variant-whitespace-700x549" width="700" height="549" class="aligncenter size-full wp-image-892" /></a></p>
<p>Andreas chose to put the sidebar above the content, which I prefer not to do. Furthermore as the sidebar was a &#8220;float&#8221; that came before the content, it caused additional inconveniences. E.g. if you had an element with <code>clear: both</code> it would be pushed bellow the sidebar. I&#8217;ve patched it a bit in order to fix those issues. You can find my modified version here: <a href="/wp-content/uploads/2011/11/variant-whitespace.tar.gz">variant-whitespace.tar.gz</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2011/11/17/modified-variant-whitespace-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracting Data from Akonadi (Kontact)</title>
		<link>http://www.guyrutenberg.com/2011/08/28/extracting-data-from-akonadi-kontact/</link>
		<comments>http://www.guyrutenberg.com/2011/08/28/extracting-data-from-akonadi-kontact/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 20:08:32 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Akonadi]]></category>
		<category><![CDATA[Kontact]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=861</guid>
		<description><![CDATA[In older versions of KDE, Kontact used to keep it&#8217;s data in portable formats. iCalendar files for KOrganizer and vCard for KAddressBook. But sometime ago Kontact moved to akonadi, a more sophisticated backend storage. By default (at least on my machine) Akonadi uses MySQL (with InnoDB) as the perssistent storage. I didn&#8217;t consider it thourghly [...]]]></description>
			<content:encoded><![CDATA[<p>In older versions of KDE, Kontact used to keep it&#8217;s data in portable formats. iCalendar files for KOrganizer and vCard for KAddressBook. But sometime ago Kontact moved to akonadi, a more sophisticated backend storage. By default (at least on my machine) Akonadi uses MySQL (with InnoDB) as the perssistent storage. I didn&#8217;t consider it thourghly when moving my data to Gnome, and I got stuck with the data.</p>
<p>To make things worth, somewhere along the update to KDE 4.6, I got some of the data moved to <code>~/.akonadi.old</code>. Being stuck with the InnoDB tables, I tried the following solutions without much success:</p>
<ol>
<li>Loading the InnoDB tables to a MySQL server. Didn&#8217;t fare good, MySQL complained about weird stuff, and I gave up in search of simpler solution.</li>
<li>I booted a OpenSuse virtual machine with KDE and tried loading my old data. Apparently, my <code>~/.akonadi</code> folder, contained nothing interesting and Suse&#8217;s KDE 4.6 refused to load the data <code>~/.akonadi.old</code> after I renamed it.
</ol>
<p>So being upset about Akonadi I did some greping and found strings from my contacts and todo lists in the following files:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Binary file .local/share/akonadi.old/db_data/ibdata1 matches
Binary file .local/share/akonadi.old/db_data/akonadi/parttable.ibd matches
Binary file .local/share/akonadi.old/db_data/ib_logfile0 matches</pre></div></div>

<p>I opened the files with vim, and found out the contained vCards and iCalendar blobs in them. So instead of directly storing them on the file-system, where they are easily accessible, they are stored in the DB files. I figured it would be easiest to just extract the data from the binary files. I&#8217;ve used the following script:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
&nbsp;
START_DELIM = <span style="color: #483d8b;">&quot;BEGIN:VCALENDAR&quot;</span>
END_DELIM = <span style="color: #483d8b;">&quot;END:VCALENDAR&quot;</span>
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    bin_data = <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdin</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    vcards = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
&nbsp;
    start = bin_data.<span style="color: black;">find</span><span style="color: black;">&#40;</span>START_DELIM<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> start <span style="color: #66cc66;">&gt;</span> -<span style="color: #ff4500;">1</span>:
        end = bin_data.<span style="color: black;">find</span><span style="color: black;">&#40;</span>END_DELIM,start+<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
        vcards.<span style="color: black;">append</span><span style="color: black;">&#40;</span>bin_data<span style="color: black;">&#91;</span>start:end + <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>END_DELIM<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        start = bin_data.<span style="color: black;">find</span><span style="color: black;">&#40;</span>START_DELIM, end+<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>vcards<span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__==<span style="color: #483d8b;">&quot;__main__&quot;</span>:
    main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>It reads binary files from stdin and outputs iCalendar data that is embedded in it. If you change <code>START_DELIM</code> and <code>END_DELIM</code> to <code>VCARD</code> instead of <code>VCALENDAR</code>, it will extract the contacts&#8217; data.</p>
<p>This migration, had me thinking how important it is that application&#8217;s data should be easily portable. It&#8217;s a thing, I feel not many projects have high enough on their priorities.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2011/08/28/extracting-data-from-akonadi-kontact/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Importing CSV to Evolution</title>
		<link>http://www.guyrutenberg.com/2011/08/26/importing-csv-to-evolution/</link>
		<comments>http://www.guyrutenberg.com/2011/08/26/importing-csv-to-evolution/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 08:14:02 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Evolution]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=855</guid>
		<description><![CDATA[I&#8217;ve decided to try Gnome on a new machine that I&#8217;ve got, and as part of the move I&#8217;ve switched to Evolution (from Kontact). I had some contacts stored in a spreadsheet which I&#8217;ve tried to import as CSV to Evolution. Apparently, unlike Kontact, Evolution won&#8217;t ask you what every column means. It would just [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to try Gnome on a new machine that I&#8217;ve got, and as part of the move I&#8217;ve switched to Evolution (from Kontact). I had some contacts stored in a spreadsheet which I&#8217;ve tried to import as CSV to Evolution.</p>
<p>Apparently, unlike Kontact, Evolution won&#8217;t ask you what every column means. It would just assume that the CSV is in some weird scheme. If you try to import the CSV, it would force the scheme on you CSV even if it looks completely different. The result &#8211; a complete mess of the fields in each contact.</p>
<p>I didn&#8217;t find the reference for how Evolution expects its CSVs to look like, and I didn&#8217;t want to analyse that either. So finally, I&#8217;ve set up a virtual machine, loaded it with OpenSuse KDE live cd and imported the CSV into Kontact and exported it as VCard which I imported to Evolution.</p>
<p>I believe, that the current CSV import in Evolution, just causes user frustration, as it doesn&#8217;t act as expected.</p>
<p>Other weird problems I&#8217;ve encountered in Evolution which I didn&#8217;t solve yet:</p>
<ol>
<li>Evolution is that it gives me &#8220;Could not remove address book&#8221; when I try to to delete an existing address books. After restarting the program I&#8217;ve succeeded in deleting some of them but not all of them.</li>
<li>When I imported the VCard from Kontact, the contacts appeared in every address book (except one) and also appeared magically in new address books I&#8217;ve created. The contacts in each of the address books seems to be linked together. When I&#8217;ve tried to delete them from one address book, they&#8217;ve disappeared from the rest as well.</li>
</ol>
<p>If you know how to solve these issues I would really like to hear.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2011/08/26/importing-csv-to-evolution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Security Vulnerabilities in the Imagin Photo Gallery</title>
		<link>http://www.guyrutenberg.com/2010/12/13/security-vulnerabilities-in-the-imagin-photo-gallery/</link>
		<comments>http://www.guyrutenberg.com/2010/12/13/security-vulnerabilities-in-the-imagin-photo-gallery/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 19:28:15 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=783</guid>
		<description><![CDATA[Following a friend&#8217;s request I&#8217;ve did a short security review of the Imagin photo gallery couple of weeks ago. I&#8217;ve looked at the newest version, v3 beta5, but the vulnerabilities may also apply to older versions. So here they are, from least to most important in my opinion. The file scripts_ralcr/others/sendMail.php is old school example [...]]]></description>
			<content:encoded><![CDATA[<p>Following a friend&#8217;s request I&#8217;ve did a short security review of the <a href="http://imagin.ro">Imagin</a> photo gallery couple of weeks ago. I&#8217;ve looked at the newest version, v3 beta5, but the vulnerabilities may also apply to older versions. So here they are, from least to most important in my opinion.<br />
<span id="more-783"></span><br />
The file <code>scripts_ralcr/others/sendMail.php</code> is old school example of vulnerable mailing scripts. It allows a remote attacker to control all the mail fields. It makes it easy to turn your server into a spam server.</p>
<p>The files <code>scripts_ralcr/filesystem/readDirectory.php</code> and <code>scripts_ralcr/filesystem/readAndCreateThums.php</code> take a <code>path</code> POST variable from the user and return a directory list of the directory <code>path</code> is pointing at. Of course it also comes with a directory-traversal so it would be easy to list whatever you want.</p>
<p>Finally, the file <code>scripts_ralcr/filesystem/writeToFile.php</code> simply allows you to provide via POST a path to a file (of course directory traversal is permitted) and content. The script will then write the content to the specified file. This allows a remote attacker to write arbitrary files on the server (which is especially useful after he dir listed everything to see what is available on the server).</p>
<p>I&#8217;ve followed the steps of responsible disclosure and contacted the author of these photo gallery before posting it. The author replied to me with:</p>
<blockquote><p>
i plan to solve them by the end of the year when i also plan to release a final version.<br />
Till then, IMAGIN is not so popular for someone to exploit it.
</p></blockquote>
<p>I believe that saying that it isn&#8217;t popular enough for exploiting it is naive. Especially noting how obvious the vulnerabilities have been.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2010/12/13/security-vulnerabilities-in-the-imagin-photo-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python&#8217;s base64 Module Fails to Decode Unicode Strings</title>
		<link>http://www.guyrutenberg.com/2010/05/03/pythons-base64-module-fails-to-decode-unicode-strings/</link>
		<comments>http://www.guyrutenberg.com/2010/05/03/pythons-base64-module-fails-to-decode-unicode-strings/#comments</comments>
		<pubDate>Mon, 03 May 2010 18:18:24 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=672</guid>
		<description><![CDATA[If you&#8217;ve got a base64 string as a unicode object and you try to use Python&#8217;s base64 module with altchars set, it fails with the following error: TypeError: character mapping must return integer, None or unicode This is pretty unhelpful error message also occurs if you try any method that indirectly use altchars. For example: [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve got a <code>base64</code> string as a <code>unicode</code> object and you try to use Python&#8217;s <a href="http://docs.python.org/library/base64.html"><code>base64</code></a> module with <code>altchars</code> set, it fails with the following error:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">TypeError: character mapping must return integer, None or unicode</pre></div></div>

<p>This is pretty unhelpful error message also occurs if you try any method that indirectly use <code>altchars</code>. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #dc143c;">base64</span>.<span style="color: black;">urlsafe_b64decode</span><span style="color: black;">&#40;</span><span style="color: #008000;">unicode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'aass'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">base64</span>.<span style="color: black;">b64decode</span><span style="color: black;">&#40;</span><span style="color: #008000;">unicode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'aass'</span><span style="color: black;">&#41;</span>,<span style="color: #483d8b;">'-_'</span><span style="color: black;">&#41;</span></pre></div></div>

<p>both fail while the following works:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #dc143c;">base64</span>.<span style="color: black;">urlsafe_b64decode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'aass'</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">base64</span>.<span style="color: black;">b64decode</span><span style="color: black;">&#40;</span><span style="color: #008000;">unicode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'aass'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>While it&#8217;s not complicated to fix it (just convert any <code>unicode</code> string to <code>ascii</code> string), it&#8217;s still annoying.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2010/05/03/pythons-base64-module-fails-to-decode-unicode-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;CC Yourself&#8221; and Spam</title>
		<link>http://www.guyrutenberg.com/2010/02/09/cc-yourself-and-spam/</link>
		<comments>http://www.guyrutenberg.com/2010/02/09/cc-yourself-and-spam/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 21:27:33 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=624</guid>
		<description><![CDATA[Every good web programmer will note that the following contact form markup is probably flawed &#60;form&#62; ... &#60;input type=&#34;hidden&#34; name=&#34;to&#34; value=&#34;support@example.com&#34; /&#62; ... &#60;/form&#62; as it is likely that if the value of the &#8220;to&#8221; field changes the message will be sent to the modified address. The problem with this kind of functionality is that [...]]]></description>
			<content:encoded><![CDATA[<p>Every good web programmer will note that the following contact form markup is probably flawed</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;form&gt;
...
    &lt;input type=&quot;hidden&quot; name=&quot;to&quot; value=&quot;support@example.com&quot; /&gt;
...
&lt;/form&gt;</pre></div></div>

<p>as it is likely that if the value of the &#8220;to&#8221; field changes the message will be sent to the modified address. The problem with this kind of functionality is that it allows a malicious user to send emails from your mail server. More specifically,  it can allow spammers to user your benign server t send their spam (and as a side effect you might be flagged as a spammer yourself).</p>
<p>As this case is pretty obvious one doesn&#8217;t see many real-life uses of it anymore (but careless programmers used it more often n the past until they learned better). However one can achieve similar goals (spam-wise) by utilizing a common feature in contact forms: the &#8220;CC yourself&#8221; checkbox.<br />
<a href="http://www.guyrutenberg.com/wp-content/uploads/2010/02/contact_form.png"><img src="http://www.guyrutenberg.com/wp-content/uploads/2010/02/contact_form.png" alt="" title="CC Yourself" width="425" height="320" class="aligncenter size-full wp-image-632" /></a><br />
<span id="more-624"></span><br />
&#8220;CC yourself&#8221;  is a convention used by some people when mailing, to verify that the email was indeed sent. It had found a place in many contact forms, as people wanted a way to make sure the form indeed works. But contact forms (as well as some mail servers) don&#8217;t verify that the email provided as the &#8220;from&#8221; is indeed owned by whoever fills the form. Combine that with the fact that many contact forms don&#8217;t employ CAPTCHAs (to make the form simpler to use), and you&#8217;ll get a situation much like the one discussed above.</p>
<p>In the first case there was a usability advantage to the programmer (who could easily re-use the form&#8217;s backend for other forms), which can be easily sacrificed for enhanced security. This time it&#8217;s worse as this is a usability feature for the user, which many people believe to be very convinient in contact forms.</p>
<p>I think there are several solutions possible:</p>
<ol>
<li>Adding CAPTCHA to the form. This will make life for the spammers harder, but it also hurt the users by raising the bar for filling out the form. Also, nowadays, it getting harder and harder to find a strong yet easy for humans CAPTCHA.</li>
<li>Removing the &#8220;CC yourself&#8221; feature. this hurts the usability of the contact form.</li>
<li>Seperating verified users and unverified. Keeping the feature for registered users, but at the same time, removing it or adding CAPTCHA for unverified users. This seems like a good trade-off, but it requires more work and registration is not applicable for all websites.</li>
</ol>
<p>In my opinion none of the solutions is perfect. It seems that once again spammers hurt the user experience for everybody else in order to fill our inboxes with unsolicited email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2010/02/09/cc-yourself-and-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Over Looking the Simple Solution</title>
		<link>http://www.guyrutenberg.com/2009/08/01/over-looking-the-simple-solution/</link>
		<comments>http://www.guyrutenberg.com/2009/08/01/over-looking-the-simple-solution/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 10:48:14 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[reStructured Text]]></category>
		<category><![CDATA[TiddlyWiki]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=414</guid>
		<description><![CDATA[Few days ago I&#8217;ve decided to start logging my rowing sessions. I disliked the idea of keeping the log on paper, so I&#8217;ve looked into a computerized solution. I ruled out Concept2&#8242;s online log book, because I wanted something private which wouldn&#8217;t require me to register on yet another website (and sometimes internet access at [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago I&#8217;ve decided to start logging my rowing sessions. I disliked the idea of keeping the log on paper, so I&#8217;ve looked into a computerized solution. I ruled out Concept2&#8242;s online log book, because I wanted something private which wouldn&#8217;t require me to register on yet another website (and sometimes internet access at my <a href="http://www.rowclub.org">rowing club</a> is broken). Soon I&#8217;ve decided to manage the log using <a href="http://www.tiddlywiki.com">TiddlyWiki</a>, a client-side html+js wiki, which <a href="http://www.guyrutenberg.com/2009/03/28/rtl-tiddlers-in-tiddlywiki/">I wrote about in the past</a>. It some nice features:<br />
1. It fits in a single self contained file that is perfect to put on a usb-stick.<br />
2. It has built-in search features.<br />
3. It allows great flexibility in how to log my sessions &#8211; no predefined format which I need to struggle to fit my sessions into.</p>
<p>The TiddlyWiki solution seemed great, and I&#8217;ve started using it. But as the title says, I merely looked over much simpler, yet as powerful, solution &#8211; a simple text file. Porting my rowing log to a simple, old-fashioned, text file provided me all the relevant features of TiddlyWiki, such as search, flexibility and working from usb-stick, while using less space and editable using a basic text-editor (or the powerful <code>vim</code>). Using <a href="http://docutils.sourceforge.net/rst.html">reStructured Text</a>, I got a nice readable journal that can be later processed into even nicer looking html files.</p>
<p>We all want to believe that we know to match the right tool for a task. But maybe, because we tend to adopt newer technologies and utilities all the time (because for a lot of tasks they do provide better tools), we end up over looking simpler, &#8220;old-fashioned&#8221;, solutions. If I take a moment now to look around, I can come up with several other places where new stuff is used instead of simpler solutions. Take a look around you, and I&#8217;m sure that you will be able to find some too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2009/08/01/over-looking-the-simple-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing Numbering Direction for Hebrew Text in LyX</title>
		<link>http://www.guyrutenberg.com/2009/01/14/fixing-numbering-direction-for-hebrew-text-in-lyx/</link>
		<comments>http://www.guyrutenberg.com/2009/01/14/fixing-numbering-direction-for-hebrew-text-in-lyx/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 07:57:11 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hebrew]]></category>
		<category><![CDATA[LyX]]></category>
		<category><![CDATA[RTL]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=242</guid>
		<description><![CDATA[On Monday, I&#8217;ve submitted a patch to the LyX developers mailing list with a fix for the numbering direction in Hebrew text. In Hebrew text the dot appeared before the numbering symbol instead of after it as it should. This behaviour has been this way for years (at least as long as I can remember). [...]]]></description>
			<content:encoded><![CDATA[<p>On Monday, I&#8217;ve submitted a patch to the LyX developers mailing list with a fix for the numbering direction in Hebrew text. In Hebrew text the dot appeared before the numbering symbol instead of after it as it should.<br />
<img src="http://www.guyrutenberg.com/wp-content/uploads/2009/01/before-fix.png" alt="before-fix" title="before-fix" width="403" height="121" class="aligncenter size-full wp-image-243" /><br />
This behaviour has been this way for years (at least as long as I can remember).<br />
<span id="more-242"></span><br />
My first solution was a patch against the actual LyX code, but developers in the mailing list suggested the issue could be solved within the <code>po</code> file for Hebrew (<code>he.po</code>), as the po files are loaded for each paragraph depending on its language.</p>
<p>So I wrote a patch for the <code>he.po</code> file that fixes the problem.</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">Index: he.po
===================================================================
<span style="color: #888822;">--- he.po	<span style="">&#40;</span>revision 28095<span style="">&#41;</span></span>
<span style="color: #888822;">+++ he.po	<span style="">&#40;</span>working copy<span style="">&#41;</span></span>
<span style="color: #440088;">@@ -15050,15 +15050,15 @@</span>
&nbsp;
 #: src/Buffer.cpp:<span style="">2902</span>
 msgid &quot;\\arabic<span style="">&#123;</span>enumi<span style="">&#125;</span>.&quot;
<span style="color: #991111;">-msgstr &quot;\\arabic<span style="">&#123;</span>enumi<span style="">&#125;</span>.&quot;</span>
<span style="color: #00b000;">+msgstr &quot;.\\arabic<span style="">&#123;</span>enumi<span style="">&#125;</span>&quot;</span>
&nbsp;
 #: src/Buffer.cpp:<span style="">2908</span>
 msgid &quot;\\roman<span style="">&#123;</span>enumiii<span style="">&#125;</span>.&quot;
<span style="color: #991111;">-msgstr &quot;\\roman<span style="">&#123;</span>enumiii<span style="">&#125;</span>.&quot;</span>
<span style="color: #00b000;">+msgstr &quot;.\\roman<span style="">&#123;</span>enumiii<span style="">&#125;</span>&quot;</span>
&nbsp;
 #: src/Buffer.cpp:<span style="">2911</span>
 msgid &quot;\\Alph<span style="">&#123;</span>enumiv<span style="">&#125;</span>.&quot;
<span style="color: #991111;">-msgstr &quot;\\Alph<span style="">&#123;</span>enumiv<span style="">&#125;</span>.&quot;</span>
<span style="color: #00b000;">+msgstr &quot;.\\Alph<span style="">&#123;</span>enumiv<span style="">&#125;</span>&quot;</span>
&nbsp;
 #: src/Buffer.cpp:<span style="">2928</span> src/insets/InsetCaption.cpp:<span style="">293</span>
 msgid &quot;Senseless!!! &quot;</pre></div></div>

<p>While this patch is against the SVN trunk (LyX 2.0), it could also be applied manually to older LyX versions.<br />
After yo apply the patch you should do the following (I assume that you are in the root of the LyX source tree):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">cd po/
make he.gmo
cd ../
make install</pre></div></div>

<p>Now restart LyX and you will see the numbering appear as it should.<br />
<img src="http://www.guyrutenberg.com/wp-content/uploads/2009/01/after-fix.png" alt="after-fix" title="after-fix" width="426" height="108" class="aligncenter size-full wp-image-245" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2009/01/14/fixing-numbering-direction-for-hebrew-text-in-lyx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.438 seconds -->

