Single Tweet using ‘Punycode’ url causes Twitter App to crash on iPhone and iPad

Single Tweet using ‘Punycode’ url causes Twitter App to crash on iPhone and iPad

If you received the belowย Tweet from one of your friends just one day back, your Twitter App may have crashed if you were using a iPhone or iPad. ย Discovered by Twitter users, this tweet contains a bug which causes the Twitter iOS to crash when a specific URL is tweeted on the network.

The strange thing about this bug is that if the tweet containing this type of URL even appears on your timeline, your Twitter App will crash even without clicking on the URL. ย This bug was discovered by a Twitter user going by the handle ofย @CPVideoMaker whose real name is Alfonso Dingo Torres. ย This was the message that Alfonso was sending to his followers and in the process crashing their Twitter App.

Punycode

The crash of the Twitter App is result of a bug which is related to the tweet containing a URL encoded with a ‘Punycode.’ Punycode is a way to represent International Domain Names (IDNs) with the limited character set (‘a’-‘z’, ‘0’-‘9’) supported by the domain name system. For example “mรผnich” would be encoded as “mnich-kva”. An IDN takes the punycode encoding, and adds a ‘xn--‘ in front of it.

In computing, Punycode is an instance of a general encoding syntax (Bootstring) by which a string of Unicode characters is transformed uniquely and reversibly into a smaller, restricted character set. The punycodeย is used because of several advantages which are given below :

  • Language independent
  • Superior in compression
  • Compact in code size
  • Round-trip safe
  • Superior for encoding Chinese/Japanese/Korean characters. (over other ACE schemes evaluated at that time)

Response from Twitter

After causing many a Twitter Apps to collapse and raising a hailstorm over social media networking websites, Alfonos contacted Twitter about the bug. ย He tweeted the reply he got from Twitter which is given below :

Even as thousands Twitterati used the social network via alternative apps to express their frustration that the official Twitter app for iOS seemingly wouldnโ€™t open after encountering the Punycode tweet, Twitter engineers quietly fixed the bug. Strangely the bug doesnโ€™t appear to affect third party apps of Twitter or Twitterโ€™s apps on other platforms like Android or Windows Phone.

As of now your Twitter App wont crash if you have received a tweet with a Punycode embedded URL.

Read More

Suggested Post