Original URL: https://www.theregister.com/2007/08/14/new_facebook_code_leak/

Student reprimands Facebook for bad manners and exposed code

Rebuke comes amid new leak of purported Facebook code

By Dan Goodin

Posted in Channel, 14th August 2007 21:07 GMT

A recent college grad is taking credit for the disclosure of Facebook's proprietary source code in an episode that demonstrates just how porous Web 2.0 technology can be.

His warning, which also included a rebuke for bad manners at Facebook, came as a second batch of purported Facebook code surfaced online, raising new questions about security at the social networking site.

According to 23-year-old Trae McNeely, a graduate in information studies from the the University of Oklahoma, the episode started early last weekend when he logged in to his Facebook account to check for new messages.

"What was supposed to be the home page with all the events and what's going on, there sat a bunch of code," he told El Reg. "I said, 'Whoa!'"

McNeely copied the code and pasted it to WMDTalk, a site he runs to discuss online movies, and then he submitted the link to Digg. "It might not be worth much but it's insight into facebook and how it works," he wrote in the submission.

The post got only six Diggs, but it nonetheless received the attention of a Facebook attorney who promptly sent McNeely an email claiming his posting infringed Facebook copyrights and requesting he remove the code.

And that gives rise to the first point McNeely has derived from the event. To wit: The site ought to be more polite.

"It sounds like it was written by a young, 20-year-old trying to use legal mumbo jumbo to make me take the code down," McNeely complained of the email. After all, Facebook forced the code down his throat. "This showed up on my browser. I didn't hack into their server. I'm in the clear."

Despite his belief that he was probably under no legal requirement to remove the code, McNeely did just that, having expunged the post at exactly 2:10, Oklahoma time, on Saturday afternoon. But the gesture also came with a little finger wagging.

"Listen, let me give you some advice," McNeely responded in an email to the attorney. "Next time respond more cordially because you, most likely, are not authorized to practice law in any fashion in any jurisdiction. If I hear anymore crap from you guys I'll sue for harassment."

McNeely expected that would be the end of it until the code ended up surfacing on Facebook Secrets, a site hosted on Blogspot that appears to have been created following the code leakage. Despite the formidable firepower of Facebook's legal team, the code remains on the Google-owned site at the time of writing, more than 72 hours after it first went up.

What's more, a second entry was made to Facebook Secrets that purports to offer another sampling of Facebook code. Facebook didn't respond to our request for comment, so there was no way for us to confirm the claim is genuine. (The code wasn't a part of the posting McNeely made over the weekend, and he says he has no idea where it came from.)

But Robert Hansen, a security researcher specializing in Web 2.0 applications, has examined the latest disclosure and said it appears to be as advertised. For example, one section beginning with the line require_js('js/editregion.js'); clearly corresponds to this section of the Facebook site.

And that raises questions about security on the site. For one thing, if it proves to be actual Facebook source code, it suggests leaks are more common than company spinmeisters would have us believe. More importantly, the latest disclosure, in contrast to the first one, goes well beyond the mere reprinting of interface code, which is of little use to someone looking for security holes.

"It gives enough information for an attacker to know where they should or shouldn't be attacking," Hansen said of the latest code disclosure.

The company said yesterday that configuration errors led to the leak of a limited amount of code and assured users security was just fine. Nothing to see here. Move along.

But like Hansen, McNeely isn't so sure. The second thing the Oklahoma grad has derived from the episode is that the Facebook can leak like a sieve. He says this isn't the first time PHP code has spontaneously appeared on his browser while surfing Facebook, and that's made him think twice.

"The type of error they got because of some misconfigured server, that tells me they're not secure," he said. "I'm not a programmer, but I can read code. In my opinion facebook is vulnerable." ®