How Does Square App Know My Full Name When I Sign Up?

Wondering how Square, the payment device and app, know your full name when you register your account from your iPhone during the sign up process? I was, and so were thousands of other software developers and hackers.

Turns out hacker John Feminella from Charlottesville, VA dug deeper into this and found the answer.

Feminella’s decompiled (the process of converting machine code back to the programming language it was written in) the Square App’s assembly file and realized it was all a very clever hack by the Engineers who wrote the Square App.

Square CEO Jack Dorsey Posing As A Barber (Photo Credit: Fast Company)

According to Feminella, here’s how Square App retrieves your full name and other contact information from your iPhone, when you register for Square using the Square App.

  • First, Square accesses the name of your iPhone. (This isn’t a protected API.)
  • For most people, the default name of the phone is something along the lines of “Steve Smith’s iPhone”. A regular expression match is performed, parsing out “Steve Smith”.
  • “Steve Smith” is then searched for in your contact list.
  • If an entry is found, it brings back the first/last names and the e-mail address for that contact. The signup form is prepopulated accordingly.
  • If an entry is not found, the signup form will stay blank. Likewise, if the name of your iPhone is something other than the default format — even if it’s just one character off — the pre-population mechanism won’t fire.

To confirm this on your own phone, Feminella suggest changing the name of your iPhone to some other contact and then opening the Square App to register.

[Thumbnail Photo: flickr/ iJustine. Dorsey Photo: @fascompanyStory Source: John Feminella on Quora]

What Next?

Recent Articles

Leave a Reply

Submit Comment