3 ms·
> is line 89 of search.php valid?? "$user 0 && ..." ? aren't we missing an comparison operator? Good job. And perhaps that's the culprit. Everybody assumed it
by aruggirello 7y ago
> is line 89 of search.php valid?? "$user 0 && ..." ? aren't we missing an comparison operator?
Good job. And perhaps that's the culprit. Everybody assumed it was a plain syntax error, but I don't think it's possible. Rather, it seems me that:
if ($user <something else ... ) {
was written here
but we'll never know because
the browser mistook it for an HTML tag,
and the user probably copied page contents
instead of saving it.
};
if (user_was_working_at_facebook_in_2007())
possibly_confirm('?');
/* lots of missing code may follow... until */
if (who knows what > 0 && ...
- growt 7y agoSo there's an unknown amount of Spaghetti Code still missing from this mess?
- deleted 7y ago[deleted]
- treyp 7y agonot sure what the reason was, but it's simply a missing >. other files were leaked, and you can see the same pattern elsewhere: if ($user > 0 && is_unregistered($user)) searching the web for this comment might be helpful if you'd like more source code: $user can be < 0 in AIM mode, just use 0 there
- warpech 7y agoThis might be due to the code pasted in some markdown editor at a point. This often strips the < and > characters.
- earenndil 7y agoMaybe. I think that's less likely than syntax error, for two reasons. #1, if you look in index.php, there's a < on line 228 and a > on line 258, correctly rendered. Granted, the < is part of a <=, which weakens that argument. #2, if you look at the surrounding code, $user > 0 makes logical sense given what the code is doing (and assuming 0 represents an invalid/nonexistent userid, which I believe it does given that facebook userids increase monotonically).
- aruggirello 7y agoExcept that a syntax error isn't likely at all - this was production code. BTW just running "php -l" would have nailed this error - PHP refuses to run a script that cannot pass the tokenization step, resulting in a blank page (and the error being logged), so such a macroscopic error would probably be short-lived even in their test environment.