<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>bugs &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/bugs/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 23 Jan 2026 07:50:31 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>bugs &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Should Android's Dark Mode Invert Contact Photos?]]></title>
		<link>https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/</link>
					<comments>https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 12 Oct 2023 11:34:39 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[AOSP]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[LineageOS]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=47423</guid>

					<description><![CDATA[I don&#039;t know if this is a bug, or just the way the world works now.  Several of the people who live in my phone use artistic black and white headshots. They look very cool. But my Android phone shows their image with inverted colours - so they look like pure shite.  Here&#039;s what my very real human girlfriend looks like when I ring her to go for brunch:   Come the evening, my phone switches to Dark …]]></description>
										<content:encoded><![CDATA[<p>I don't know if this is a bug, or just the way the world works now.</p>

<p>Several of the people who live in my phone use artistic black and white headshots. They look very cool. But my Android phone shows their image with inverted colours - so they look like pure shite.</p>

<p>Here's what my very real human girlfriend looks like when I ring her to go for brunch:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Normal-MM-fs8.png" alt="Screenshot of the Android contacts app. A black and white photo of Marylin Monroe is featured." width="540" height="674" class="aligncenter size-full wp-image-47428"></p>

<p>Come the evening, my phone switches to Dark Mode™ - so this is what she looks like when I ring her for a late-night booty call:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Inverted-MM-fs8.png" alt="Monochrome photo of Marylin Monroe. The colours have been inverted and it looks rubbish." width="540" height="674" class="aligncenter size-full wp-image-47427"></p>

<p>What's causing this? And is it expected behaviour?</p>

<p>I'm running <code>com.android.contacts</code> version 1.7.34 which <a href="https://android.googlesource.com/platform/packages/apps/Contacts/+/refs/heads/master/AndroidManifest.xml">appears to be the latest version</a> of the AOSP contacts app. It's bundled with LineageOS.</p>

<h2 id="demo"><a href="https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/#demo">Demo</a></h2>

<p>If you're not lucky enough to be dating Marylin Monroe, here's a demo image for you to try:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/monochrometest.jpg" alt="A white square with the words &quot;monochrome test&quot; printed in black text." width="274" height="274" class="aligncenter size-full wp-image-47425">

<h2 id="is-this-expected-behaviour"><a href="https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/#is-this-expected-behaviour">Is this expected behaviour?</a></h2>

<p>Based on some quick tests, it appears that the contacts app will invert some monochrome images when it thinks there's "too much" bright white in the image.</p>

<p>Interestingly, the contacts list doesn't invert avatars when in Dark Mode.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Contacts-list-view-fs8.png" alt="Screenshot of Android's contacts list. A black background - but the photo of Marylin is normal." width="606" height="336" class="aligncenter size-full wp-image-47429">

<p>And... I don't know if I want this to happen.  I guess that most people who use Dark Mode want to avoid blinding bright white light searing into their precious eyeballs. But, presumably, they don't want the photos of their friends inverted into a weird artefact-ridden mess?</p>

<p>So, before I get lost in Google's Kafka-esque bug reporting process - do <em>you</em> think this is expected or desirable behaviour?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=47423&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Google Books - search results confuse reviewers with authors]]></title>
		<link>https://shkspr.mobi/blog/2023/09/google-books-search-results-confuse-reviewers-with-authors/</link>
					<comments>https://shkspr.mobi/blog/2023/09/google-books-search-results-confuse-reviewers-with-authors/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 22 Sep 2023 11:34:31 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[google]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=46814</guid>

					<description><![CDATA[Google Books is one of many projects that Google has forgotten about. There&#039;s no support available and, of course, it&#039;s impossible to send them a bug report. The best anyone can do is write a ranty blog post and hope it gets noticed.  When I search for my name in Google Books, it returns books I have reviewed. These aren&#039;t books that I&#039;ve written. They don&#039;t mention, quote, or cite me. My reviews …]]></description>
										<content:encoded><![CDATA[<p>Google Books is one of <em>many</em> projects that Google has forgotten about. There's no support available and, of course, it's impossible to send them a bug report. The best anyone can do is write a ranty blog post and hope it gets noticed.</p>

<p>When I search for my name in Google Books, it returns books I have <em>reviewed</em>. These aren't books that I've written. They don't mention, quote, or cite me. My reviews don't appear on the dust-jacket. Google has got confused.</p>

<p>Here's an example.</p>

<p>Go to the <a href="https://books.google.com/advanced_book_search?hl=en">Google Books Advanced Search Page</a> - marvel at how it retain the old Google logo and looks like it hasn't been updated since the early 2000s!</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/09/Google-Books-Search-fs8.png" alt="Google Books Search page. It looks old and outdated." width="1024" height="261" class="aligncenter size-full wp-image-46816">

<p>When I do a search for "Terence Eden" - these are the results.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/09/Google-Books-Search-Results-fs8.png" alt="Google Books Search Results page." width="1061" height="715" class="aligncenter size-full wp-image-46815">

<p>I have reviewed both <a href="https://shkspr.mobi/blog/2020/01/book-review-terry-pratchetts-discworld-imaginarium/">Terry Pratchett's Discworld Imaginarium</a> (excellent) and <a href="https://shkspr.mobi/blog/2021/04/book-review-good-data-by-sam-gilbert/">Good Data by Sam Gilbert</a> (terrible) - but that's my only connection to them. If you go into the results in Google Books, you won't find my name at all.  It's not like Google adds my reviews into its service either.</p>

<p><a href="https://twitter.com/edent/status/1209082854099030016">This has been a problem for at least four years</a>.</p>

<p>As I scroll through the results, there are several books which do mention me (thanks authors!) but loads which are just picking up my review.</p>

<p>To get an idea of the scale of the problem, here's <a href="https://www.google.com/search?tbo=p&amp;tbm=bks&amp;q=%22Terence+Eden%22&amp;tbs=,cdr:1,cd_min:Jan+1_2+2021,cd_max:Dec+31_2+2024&amp;num=10">a search for my name in books published during the last few years</a>. Nearly every result is a book I have reviewed. None of those books contain my name.</p>

<p>Now, earlier I said it is impossible to report bugs to Google Books. That's not quite true. Last year I contacted them on Twitter.  They said:</p>

<blockquote class="social-embed" id="social-embed-1531656670920704000" lang="en" itemscope="" itemtype="https://schema.org/SocialMediaPosting"><header class="social-embed-header" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><a href="https://twitter.com/googlebooks" class="social-embed-user" itemprop="url"><img class="social-embed-avatar social-embed-avatar-circle" src="data:image/webp;base64,UklGRh4BAABXRUJQVlA4IBIBAABQBwCdASowADAAPrVQok2nJCMiJzgKSOAWiWQAzdH/5dgjDUcgCywIlfV7TrC4V8wGVuIlGdJtM3nsLQxvhdQcFR0AAP7+Lo/1ps8sL3zSX5buvB7oXtZHrfqQvF9u3QBgx63ZNzu3AqB0shaC8yfmEdTWvAK5LIHwHD8ilkyaaGDYhU+MQM7/+L5f4nVMbxfPdy0Mz4h+OxIJGlRT+qcoQNZzTk+I/1Pim3FB8qudcP4TAwuwi/x3Y125L0PGX60ExhGp7Xf9V8mBC/6xiZMWHYxbL6wWkiGJKcNN6jKoKWbJgSKJiQMkSIrKd1PaUOlNops4p4vJ7gyWiTFjBLmO18YVeqojzJusWw53CdyFHIAA" alt="" itemprop="image"><div class="social-embed-user-names"><p class="social-embed-user-names-name" itemprop="name">Google Books</p>@googlebooks</div></a><img class="social-embed-logo" alt="Twitter" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0Aaria-label%3D%22Twitter%22%20role%3D%22img%22%0AviewBox%3D%220%200%20512%20512%22%3E%3Cpath%0Ad%3D%22m0%200H512V512H0%22%0Afill%3D%22%23fff%22%2F%3E%3Cpath%20fill%3D%22%231d9bf0%22%20d%3D%22m458%20140q-23%2010-45%2012%2025-15%2034-43-24%2014-50%2019a79%2079%200%2000-135%2072q-101-7-163-83a80%2080%200%200024%20106q-17%200-36-10s-3%2062%2064%2079q-19%205-36%201s15%2053%2074%2055q-50%2040-117%2033a224%20224%200%2000346-200q23-16%2040-41%22%2F%3E%3C%2Fsvg%3E"></header><section class="social-embed-text" itemprop="articleBody"><small class="social-embed-reply"><a href="https://twitter.com/edent/status/1525792630436683779">Replying to @edent</a></small><a href="https://twitter.com/edent">@edent</a> Hi, thank you for your feedback. I've passed it along to our engineering team. -Cait</section><hr class="social-embed-hr"><footer class="social-embed-footer"><a href="https://twitter.com/googlebooks/status/1531656670920704000"><span aria-label="1 likes" class="social-embed-meta">❤️ 1</span><span aria-label="1 replies" class="social-embed-meta">💬 1</span><span aria-label="0 reposts" class="social-embed-meta">🔁 0</span><time datetime="2022-05-31T15:19:41.000Z" itemprop="datePublished">15:19 - Tue 31 May 2022</time></a></footer></blockquote>

<p><em>*sigh*</em></p>

<p>Perhaps their pivot to AI will fix their towering pile of bugs?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=46814&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/09/google-books-search-results-confuse-reviewers-with-authors/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[What does "挨⎒" have to do with "<html"?]]></title>
		<link>https://shkspr.mobi/blog/2019/03/what-does-%e6%8c%a8%e2%8e%92-have-to-do-with-html/</link>
					<comments>https://shkspr.mobi/blog/2019/03/what-does-%e6%8c%a8%e2%8e%92-have-to-do-with-html/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 13 Mar 2019 12:37:14 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[Text Encoding]]></category>
		<category><![CDATA[unicode]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=31674</guid>

					<description><![CDATA[I received this weird bit of mojibake in an email.  Here&#039;s the raw text view:  ------=_NextPart_001_009E_01D4D8BF.D0737E10 Content-Type: text/plain; charset=&#38;quot;UTF-8&#38;quot; Content-Transfer-Encoding: quoted-printable  =E6=8C=A8=E2=8E=92tml xmlns:v=3D&#38;quot;urn:schemas-microsoft-com:vml&#38;quot; xmlns:o=3D&#38;quot;= urn:schemas-microsoft-com:office:office&#38;quot; xmlns:w=3D&#38;quot;urn:schemas-microsoft-c=…]]></description>
										<content:encoded><![CDATA[<p>I received this weird bit of <a href="https://simple.wikipedia.org/wiki/Mojibake">mojibake</a> in an email.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/03/mojibake.jpg" alt="Garbled text in an email." width="1080" height="168" class="aligncenter size-full wp-image-31678">
Here's the raw text view:</p>

<pre><code class="language-_">------=_NextPart_001_009E_01D4D8BF.D0737E10
Content-Type: text/plain; charset=&amp;quot;UTF-8&amp;quot;
Content-Transfer-Encoding: quoted-printable

=E6=8C=A8=E2=8E=92tml xmlns:v=3D&amp;quot;urn:schemas-microsoft-com:vml&amp;quot; xmlns:o=3D&amp;quot;=
urn:schemas-microsoft-com:office:office&amp;quot; xmlns:w=3D&amp;quot;urn:schemas-microsoft-c=
om:office:word&amp;quot; xmlns:m=3D&amp;quot;http://schemas.microsoft.com/office/2004/12/omml=
&amp;quot; xmlns=3D&amp;quot;http://www.w3.org/TR/REC-html40&amp;quot;&amp;gt;
</code></pre>

<p>What's going on?</p>

<ul>
<li>挨 is a Chinese, Japanese, Korean (cjk) unified ideograph (U+6328)</li>
<li>⎒ is the passive-pull-up-output symbol (U+2392)</li>
</ul>

<p>That's somehow replaced:</p>

<ul>
<li>&lt; - less-than sign (U+003C)</li>
<li>h - Latin small letter h (U+0068)</li>
</ul>

<p><code>&lt;h</code> in binary is  <code>00111100 01101000</code></p>

<p><code>挨⎒</code> in binary is <code>11100110 10001100 10101000 11100010 10001110 10010010</code></p>

<p>It was sent from Outlook 2010 to Gmail. But I receive lots of those emails.</p>

<p>Try as I might, I just can't work out where this error has crept in. A glitch in the Matrix? Electronic interference? Any clues, gang?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=31674&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2019/03/what-does-%e6%8c%a8%e2%8e%92-have-to-do-with-html/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Facebook Mangles Unicode URLs]]></title>
		<link>https://shkspr.mobi/blog/2015/02/facebook-mangles-unicode-urls/</link>
					<comments>https://shkspr.mobi/blog/2015/02/facebook-mangles-unicode-urls/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 27 Feb 2015 12:45:54 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[unicode]]></category>
		<category><![CDATA[url]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=20643</guid>

					<description><![CDATA[2025 Update - Bitly removed the ability to create emoji links, so some of these links are now dead.  Facebook rewrite URLs with Unicode in the path - this is not best practice and could be dangerous.  It is possible to create a URL like http://bit.ly/😀 - the Unicode characters are valid in the path.  The URL Encoded representation is :  bit.ly/%F0%9F%98%80  Facebook mangles these URLs in such a wa…]]></description>
										<content:encoded><![CDATA[<p><ins datetime="2025-02-27T10:23:46+00:00">2025 Update - Bitly removed the ability to create emoji links, so some of these links are now dead.</ins></p>

<p>Facebook rewrite URLs with Unicode in the path - this is not best practice and could be dangerous.</p>

<p>It is possible to create a URL like <a href="http://bit.ly/😀">http://bit.ly/😀</a> - the Unicode characters are valid in the path.</p>

<p>The URL Encoded representation is :</p>

<pre>bit.ly/%F0%9F%98%80</pre>

<p>Facebook mangles these URLs in such a way that it <em>might</em> be possible to redirect a user to a malicious site.</p>

<p>Here's what's happening.  When Facebook sees the "😀" character in text, it rewrites it to the "󾰀" character (&amp;#1043456;).  That's a "<a href="http://unicodelookup.com/#%F3%BE%B0%80/1">private use character</a>".  This means Facebook can replace the user's computer's default smiley with a Facebook supplied image or font glyph - if it wants.</p>

<p>In normal text - such as "I passed my exams 😀" - changing the smiley is doesn't present a problem, but Facebook also <strong>replaces the text in a URL!</strong></p>

<p>So, the URL :</p>

<pre>bit.ly/%F0%9F%98%80%F0%9F%98%80</pre>

<p>Will point to a <a href="http://bit.ly/😀😀">Facebook security page</a>.</p>

<p>Facebook changes the URL to :</p>

<pre>bit.ly/%F3%BE%B0%80%F3%BE%B0%80</pre>

<p>Which points elsewhere - <a href="http://bit.ly/%F3%BE%B0%80%F3%BE%B0%80">bit.ly/󾰀󾰀</a>.</p>

<p>I performed a couple of quick experiments.  It is <em>sometimes</em> possible to post a link which displays a preview of a "good" site, but when clicked on leads to a bad site.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/02/rickroll-fs8.png" alt="rickroll-fs8" width="521" height="690" class="aligncenter size-full wp-image-20648">

<p>The chances of this being used as a successful attack vector are slim.  Tricking the user into clicking on a link which subsequently steals their password is made marginally easier if the link and link preview don't match - but I'm sure there are easier ways of deceiving the user.</p>

<p>The real issue here is that Facebook is altering the text that you write - and that can have unexpected consequences.</p>

<p>We live in a non-ASCII world now.  A URL like <a href="https://莎士比亚.org/%E5%A5%A5%E7%91%9F%E7%BD%97">https://莎士比亚.org/奥瑟罗</a> is <em>perfectly valid</em>.  Facebook - and other sites - should <strong>not</strong> be confused by non-Latin characters.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=20643&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2015/02/facebook-mangles-unicode-urls/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[RTL Bugs]]></title>
		<link>https://shkspr.mobi/blog/2014/02/rtl-bugs/</link>
					<comments>https://shkspr.mobi/blog/2014/02/rtl-bugs/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 24 Feb 2014 12:02:16 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[unicode]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=9988</guid>

					<description><![CDATA[Take a look at the following text, looks normal enough doesn&#039;t it?  &#34;Harry ‮&#34;.draziw a si ‭Potter  Now, try to select the text and see what happens.  WHAT WITCHCRAFT IS THIS?!  If you examine the source code for this page, you&#039;ll see that I&#039;m using the Unicode Bi-Directional characters.  &#34;Harry &#38;#x202e;&#34;.draziw a si &#38;#8237;Potter  These characters are useful when writing text that includes, say, E…]]></description>
										<content:encoded><![CDATA[<p>Take a look at the following text, looks normal enough doesn't it?</p>

<h2 id="harry-draziw-a-si-potter"><a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#harry-draziw-a-si-potter">"Harry ‮".draziw a si ‭Potter</a></h2>

<p>Now, try to select the text and see what happens.</p>

<p>WHAT WITCHCRAFT IS THIS?!</p>

<p>If you examine the source code for this page, you'll see that I'm using the <a href="https://en.wikipedia.org/wiki/Unicode_character_property#Bidirectional_writing">Unicode Bi-Directional characters</a>.</p>

<pre>"Harry &amp;#x202e;".draziw a si &amp;#8237;Potter</pre>

<p>These characters are useful when writing text that includes, say, English and Arabic - but <a href="http://krebsonsecurity.com/2011/09/right-to-left-override-aids-email-attacks/">they can also be used for malicious purposes</a>.</p>

<p>On a more mundane level, they can cause all sorts of UI bugs.  I've just <a href="http://code.google.com/p/chromium/issues/detail?id=345691">filed a bug against the Chrome browser for how it handles these characters</a>.</p>

<p>If you right click on text with mixed direction, you'll notice that the UI behaves oddly.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Chrome-RTL-fs8.png" alt="Chrome RTL-fs8" width="480" height="330" class="aligncenter size-full wp-image-9996">

<p>In Firefox, the behaviour is correct - although one could argue whether "Potter" ought to be reversed.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Firefox-RTL-fs8.png" alt="Firefox RTL-fs8" width="480" height="430" class="aligncenter size-full wp-image-9995">

<h2 id="searching"><a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#searching">Searching</a></h2>

<p>So, what happens when we run these searches?</p>

<p><img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Chromium-RTL-Search-fs8.png" alt="Chromium RTL Search-fs8" width="640" height="165" class="aligncenter size-full wp-image-9999"><br>
<img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Firefox-RTL-Search-fs8.png" alt="Firefox RTL Search-fs8" width="640" height="165" class="aligncenter size-full wp-image-9998"></p>

<p>Neither Firefox nor Chrome do particularly well.  I'm not sure if the reversed text in the window title and URL bar are bugs in Ubuntu - or whether it's the fault of the app itself.</p>

<p>On Windows and Mac, we see this happen:</p>

<p><img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Safari-RTL-fs8.png" alt="Safari RTL-fs8" width="818" height="155" class="aligncenter size-full wp-image-10002"><br>
<img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/IE-RTL-fs8.png" alt="IE RTL-fs8" width="606" height="145" class="aligncenter size-full wp-image-10003"></p>

<p>This would suggest that Google isn't correcting the direction of the text and that is deforming its own title tags.</p>

<h2 id="are-these-bugs"><a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#are-these-bugs">Are These Bugs?</a></h2>

<p>Ok, so having the title reversed isn't the worst problem in the world.  But do these examples count as bugs and, if so, who is responsible for them?</p>

<p>Every search engine I tried passed through the right-to-left-over-ride unscathed - so that's the fault of the search engine, right?  How the hell do you a report a bug to Google?</p>

<p>The title bar could either be a problem with the browser - <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=814030">Firefox has a bug report over a year old on the issue</a> - or the problem could be with the underlying operating system.  How would one find out?</p>

<h2 id="thanks"><a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#thanks">Thanks</a></h2>

<p>Thanks to <a href="https://www.linkedin.com/in/yuanphoon/">Yuan Phoon</a> for asking the questions which prompted this discovery.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=9988&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2014/02/rtl-bugs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Another Google Privacy Flaw - Calendar Unexpectedly Leaks Private Information (Disclosed)]]></title>
		<link>https://shkspr.mobi/blog/2014/01/another-google-privacy-flaw/</link>
					<comments>https://shkspr.mobi/blog/2014/01/another-google-privacy-flaw/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 23 Jan 2014 12:02:18 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[privacy]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=9531</guid>

					<description><![CDATA[My wife likes to set reminders for herself in Google Calendar.   Recently, she added a note to her personal Google Calendar reading &#34;Email alice@example.com to discuss pay rise&#34; and set the date for a few months from now.  She&#039;d had a discussion with her boss, Alice, and they&#039;d agreed to talk about salary later in the year.  A few moments later, Alice sent her a &#34;Meeting Accepted&#34; email.  What... …]]></description>
										<content:encoded><![CDATA[<p>My <a href="https://web.archive.org/web/20121203140518/http://mymisanthropicmusings.org.uk/">wife</a> likes to set reminders for herself in Google Calendar.</p>

<p><img src="https://shkspr.mobi/blog/wp-content/uploads/2014/01/Email-Pay-Rise-fs8.png" alt="Email Pay Rise-fs8" width="512" height="334" class="aligncenter size-full wp-image-9532">
Recently, she added a note to her <em>personal</em> Google Calendar reading "<span style="font-family:monospace;">Email alice@example.com to discuss pay rise</span>" and set the date for a few months from now.  She'd had a discussion with her boss, Alice, and they'd agreed to talk about salary later in the year.</p>

<p>A few moments later, Alice sent her a "Meeting Accepted" email.</p>

<p>What... The...?</p>

<p>Although pretty embarrassing, it could have been a lot worse.  It could have been "<span style="font-family:monospace;">Email mother-in-law@example.com with excuse why we can't see her</span>" or perhaps "<span style="font-family:monospace;">Email husband@example.com with divorce details</span>" or even "<span style="font-family:monospace;">Email co-worker@example.com to demand red stapler back</span>" or... well, you get the picture.</p>

<p>Luckily, my wife doesn't have a Google+ profile, so there was no information leak other than her email address (which wasn't "huggle.wuggle.2012" or anything daft like that!)</p>

<p>We've tried several times to recreate this behaviour.  Here's what we discovered:</p>

<ul>
    <li>If you use Google Calendar on the web and put a Gmail address in the subject line, that user <em>will</em> have the event added to the calendar.</li>
    <li>They will <strong>not</strong> receive an email notification - although they will get a "meeting reminder" pop-up.</li>
    <li>Creating an event on an Android phone does <em>not</em> trigger a meeting request.</li>
    <li><em>Some</em> non-Gmail addresses will also see the meeting in their calendar - but others will not.</li>
    <li>When you <em>delete</em> a calendar item, the "Cancellation" notification is emailed <strong>regardless</strong> of whether the user received the original invite.</li>

</ul>

<p><img src="https://shkspr.mobi/blog/wp-content/uploads/2014/03/Delete-fs8.png" alt="Delete-fs8" width="654" height="157" class="aligncenter size-full wp-image-9611">
We were unable to determine which <strong>non</strong>-Gmail addresses would receive the item in their calendar. Some which were hosted with Google didn't receive the pseudo-invitation.  Some accounts hosted on Microsoft Exchange got the invite while others on seemingly similar systems didn't.</p>

<p>Here's a video showing it in action.</p>

<iframe title="Google Calendar Privacy Leak" width="620" height="465" src="https://www.youtube.com/embed/ZqjYb6eiMWE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p>Note that when a user fills in the pop-up, Google Calendar asks for confirmation to send a meeting invite. When using the full interface, <strong>no warning whatsoever</strong> is given.</p>

<h2 id="impact"><a href="https://shkspr.mobi/blog/2014/01/another-google-privacy-flaw/#impact">Impact</a></h2>

<p>Google has tried to be clever here.  It has failed.  Just because I am talking <em>about</em> someone, it doesn't mean I am talking <em>to</em> someone.</p>

<p>There are two main risks here - the user could expose her private Gmail account and associated Google+ data, and she could also reveal her private thoughts and feelings.</p>

<p>Google really needs to work harder at <a href="https://web.archive.org/web/20140108005151/http://storify.com/joliss/what-happens-when-our-software-has-broken-privacy">protecting the privacy of its users</a>.</p>

<h2 id="disclosure"><a href="https://shkspr.mobi/blog/2014/01/another-google-privacy-flaw/#disclosure">Disclosure</a></h2>

<p>This privacy issue was formally disclosed to Google on 6th January 2014.
On 22nd January, they responded by saying they <em>didn't</em> consider it a problem.</p>

<blockquote><p>We reviewed your report. After careful consideration by our security team, we feel that the issue has minimal impact on the security of our users. Let us know if you believe that this determination may be incorrect. If you'd submitted your report as part of our reward program, this means it doesn't qualify for reward or credit. Thanks for your help!</p></blockquote>

<p>As much as I'm disappointed not to be getting a <a href="http://www.google.co.uk/about/appsecurity/reward-program/">$10,000 bug bounty</a>, I'm more upset that Google repeatedly finds itself <a href="http://www.zdnet.com/google-outed-me-7000025416/">failing to keep its users' private information private</a>.</p>

<p><ins datetime="2014-01-23T13:54:42+00:00">Update</ins>: according to a comment on the <a href="https://news.ycombinator.com/item?id=7107597">HackerNews discussion</a> - problems like this have been <a href="http://lee-phillips.org/gcaldisaster/">reported to Google as far back as 2010</a>.</p>

<p><ins datetime="2014-01-24T10:52:34+00:00">Update 24 January</ins>: Google have agreed to fix this bug!</p>

<blockquote><p>[W]e agree that the behavior you identified is undesirable, and we filed a bug with the Calendar team last week.  They’ve been working on changing the behavior to make it clearer that someone has been added to the event in the situation you described.</p></blockquote>

<p>While we won't be getting any of the monetary reward from the bug bounty, Google have graciously decided to include us in their <a href="http://www.google.com/about/appsecurity/hall-of-fame/distinction/">Security Hall of Fame</a>.</p>

<p>You can continue the discussion on <a href="http://www.theverge.com/2014/1/23/5337830/google-calendar-email-event-title-invitation-issue">The Verge</a>, <a href="http://arstechnica.com/security/2014/01/how-google-calendar-can-tip-off-your-boss-you-want-a-raise/">ars technica</a>, <a href="http://www.businessinsider.com/google-calendar-automatic-invites-2014-1">Business Insider</a> and <a href="https://web.archive.org/web/20140124074134/http://www.androidcentral.com/google-calendar-bug-could-bring-uninvited-guests-your-events">Android Central</a>.</p>

<p><ins datetime="2014-01-31T10:25:06+00:00">Update 31 January</ins>: This flaw was discussed on the <a href="http://twit.tv/show/this-week-in-google/234">"This Week In Google" podcast</a>.
</p><div style="width: 620px;" class="wp-video"><video class="wp-video-shortcode" id="video-9531-2" width="620" height="357" preload="metadata" controls="controls"><source type="video/webm" src="https://shkspr.mobi/blog/wp-content/uploads/2014/01/gcaltrim.webm?_=2"><a href="https://shkspr.mobi/blog/wp-content/uploads/2014/01/gcaltrim.webm">https://shkspr.mobi/blog/wp-content/uploads/2014/01/gcaltrim.webm</a></video></div><p></p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=9531&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2014/01/another-google-privacy-flaw/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2014/01/gcaltrim.webm" length="28297541" type="video/webm" />

			</item>
		<item>
		<title><![CDATA[Interesting Twitter Hashbang Bug]]></title>
		<link>https://shkspr.mobi/blog/2012/05/interesting-twitter-hashbang-bug/</link>
					<comments>https://shkspr.mobi/blog/2012/05/interesting-twitter-hashbang-bug/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 04 May 2012 09:28:23 +0000</pubDate>
				<category><![CDATA[usability]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=5670</guid>

					<description><![CDATA[Did you know that you can to link to a specific Tweet on Twitter?  The URL looks like this: https://twitter.com/#!/edent/status/197967209459499008  Pretty obviously, that&#039;s the user&#039;s name and the ID of their tweet.  Simple, right?  Not really, click on that link and you&#039;ll see this:  That&#039;s my name in the URL bar - but the Number 10 Press Office&#039;s tweet on the page.  What&#039;s Going On?  Have I…]]></description>
										<content:encoded><![CDATA[<p>Did you know that you can to link to a specific Tweet on Twitter?  The URL looks like this:
<a href="https://twitter.com/#!/edent/status/197967209459499008">https://twitter.com/#!/edent/status/197967209459499008</a></p>

<p>Pretty obviously, that's the user's name and the ID of their tweet.  Simple, right?</p>

<p>Not really, click on that link and you'll see this:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/05/twitter-bug-screenshot.jpg" alt="twitter bug screenshot" title="twitter bug screenshot" width="600" height="260" class="aligncenter size-full wp-image-5671">
That's my name in the URL bar - but the Number 10 Press Office's tweet on the page.</p>

<h2 id="whats-going-on"><a href="https://shkspr.mobi/blog/2012/05/interesting-twitter-hashbang-bug/#whats-going-on">What's Going On?</a></h2>

<p>Have I retweeted that status? Nope!
Am I a 1337 h4x0r who has hacked Number 10? No sir!
Is the screenshot a fake? Nuh-uh. <a href="https://twitter.com/#!/edent/status/197967209459499008">Check the link yourself</a>.</p>

<p>It's actually a curious bug / feature of Twitter.  Each tweet you send has a unique ID. So there can only be one tweet with the ID 197967209459499008.  And that ID will always belong to @Number10press.</p>

<p>The username part in the URL is redundant. It seems that it is not used except to give information to the user / search engines.  It can be safely omitted or manipulated.</p>

<h2 id="malicious-use"><a href="https://shkspr.mobi/blog/2012/05/interesting-twitter-hashbang-bug/#malicious-use">Malicious Use?</a></h2>

<p>It strikes me that there is a slim chance of malicious use.</p>

<p>One could create a fake account - say Number1Opress (where the 0 has been replaced with a capital O).  Make it tweet something ridiculous, then share a URL which has the real Number10press in the URL.  Minor embarrassment is probably the worst consequence.</p>

<p>It's an interesting usability / security nexus.  The username is placed in the URL to make it easier or more useful for users - but it is ignored by the back end system.  As it's part of <a href="http://www.adequatelygood.com/2011/2/Thoughts-on-the-Hashbang">the hated hashbang syntax</a>, I wonder if it could be simply be rewritten if there's a mismatch?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=5670&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/05/interesting-twitter-hashbang-bug/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Bugs in Twitter Text Libraries]]></title>
		<link>https://shkspr.mobi/blog/2010/03/bugs-in-twitter-text-libraries/</link>
					<comments>https://shkspr.mobi/blog/2010/03/bugs-in-twitter-text-libraries/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 10:27:50 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[dabr]]></category>
		<category><![CDATA[parse]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[urls]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=1924</guid>

					<description><![CDATA[The Twitter Engineering Team have a set of text processing classes which are meant to simplify and standardise the recognition of URLs, screen names, and hashtags.  Dabr makes use of them to keep in conformance with Twitter&#039;s style.  One of the advantages of the text processing is that it will recognise that www.example.com is a URL and automatically create a hyperlink. Considering that dropping…]]></description>
										<content:encoded><![CDATA[<p>The <a href="https://blog.twitter.com/engineering/en_us/a/2010/introducing-the-open-source-twitter-text-libraries">Twitter Engineering Team have a set of text processing classes</a> which are meant to simplify and standardise the recognition of URLs, screen names, and hashtags.  Dabr makes use of them to keep in conformance with Twitter's style.</p>

<p>One of the advantages of the text processing is that it will recognise that www.example.com is a URL and automatically create a hyperlink. Considering that dropping the "http://" represents 5% saving on Twitter's 140 character limit for messages, this is great.</p>

<p>So, I was mightily surprised to get <a href="http://twitter.com/schmmuck/status/11352406573">this bug report</a> from user "schmmuck"</p>

<p></p><div id="attachment_1927" style="width: 490px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1927" class="size-full wp-image-1927" title="Dabr rendering error" src="https://shkspr.mobi/blog/wp-content/uploads/2010/03/Capture8_19_22.jpg" alt="Dabr rendering error" width="480" height="320"><p id="caption-attachment-1927" class="wp-caption-text">Dabr rendering error</p></div><p></p>

<p>How very odd...  This is how it looks on <a href="http://m.twitter.com/">m.twitter.com</a>.</p>

<p></p><div id="attachment_1926" style="width: 490px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1926" class="size-full wp-image-1926" title="m.twitter rendering error" src="https://shkspr.mobi/blog/wp-content/uploads/2010/03/Capture8_20_48.jpg" alt="m.twitter rendering error" width="480" height="320"><p id="caption-attachment-1926" class="wp-caption-text">m.twitter rendering error</p></div><p></p>

<p>Twitter also use <a href="http://mobile.twitter.com/">mobile.twitter.com</a> for smartphones.  Here's how that site renders the text.</p>

<p></p><div id="attachment_1925" style="width: 490px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1925" class="size-full wp-image-1925" title="mobile.twitter rendering error" src="https://shkspr.mobi/blog/wp-content/uploads/2010/03/Capture8_21_54.jpg" alt="mobile.twitter rendering error" width="480" height="320"><p id="caption-attachment-1925" class="wp-caption-text">mobile.twitter rendering error</p></div><p></p>

<p>Finally, let's take a look at the "canonical" rendering at Twitter.com</p>

<p></p><div id="attachment_1928" style="width: 410px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1928" class="size-full wp-image-1928" title="Twitter rendering error" src="https://shkspr.mobi/blog/wp-content/uploads/2010/03/Twitter-rendering-error.jpg" alt="Twitter rendering error" width="400" height="213"><p id="caption-attachment-1928" class="wp-caption-text">Twitter rendering error</p></div><p></p>

<h2 id="the-problems"><a href="https://shkspr.mobi/blog/2010/03/bugs-in-twitter-text-libraries/#the-problems">The Problem(s)</a></h2>

<p>The first issue is inconsistency.&nbsp; Twitter ought to be using the same regex for each of its sites.&nbsp; It doesn't.&nbsp; This means that different developers will get divergent experiences.&nbsp; This leads to confusion, which leads to fear, which, as we all know, leads to anger.... and so forth.</p>

<p>Secondly, and more importantly, parsing is <em>hard</em>.&nbsp; There are so many edge cases that errors inevitably creep in.&nbsp; My post about hashtags explains the problems in defining what <em>should</em> be recognised.</p>

<p>So, based on what we've seen, should Twitter recognise any of the following as URLs?</p>

<p>news.bbc.co.uk - no www there.</p>

<p>invalid.name - a silly URL, but a valid one.</p>

<p>खोज.com - International domains contain more than just ASCII</p>

<p>All the above are valid - yet they're not recognised by Twitter.</p>

<h2 id="a-simple-solution"><a href="https://shkspr.mobi/blog/2010/03/bugs-in-twitter-text-libraries/#a-simple-solution">A (Simple) Solution?</a></h2>

<p>There is a <a href="http://www.iana.org/domains/root/db/">canonical list of TLDs</a> which is also available as a <a href="http://data.iana.org/TLD/tlds-alpha-by-domain.txt">plain text list</a>.</p>

<p>Any string containing a "." followed by a valid TLD, then followed by a space or "/" should be treated as a URL.</p>

<p>Your thoughts?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=1924&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/03/bugs-in-twitter-text-libraries/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
	</channel>
</rss>
