by hmate9 · 7y ago · 0 comments
1) As a software engineer I can't imagine how such errors could possibly have entered production code accidentally, especially after code review. If precise details of these errors are released I am open to have my mind changed.
2) Even if it did, I can't see how it would take facebook's tens of thousands of engineers 7 years to find this "bug".
Someone who works as a Dev on Facebook should know that HTTP requests can contain sensitive data, session cookies, passwords, credit card information, etc.
2. You create a system that detects high entropy content before being logged.
3. You don't want to drop all high entropy content, so you create some rules about where in requests to look for high entropy content.
4. Something about the request structure changes, breaking your log filtering.
5. There is nothing that notices the drop in the amount of content filtered out of logs.
There's oodles of ways this could happen. I'd wager that more than half of all businesses that have a website that handles passwords has logged passwords in plaintext somewhere.
Unfortunately, as numerous password breaches have shown, most passwords aren't that high entropy.
Like i'd love to agree, but frankly, i'm not surprised. I feel like I've seen crazier things happen on production environments...
The logs contained user credentials, and they hadn't noticed. I pointed it out to the CTO.
My engineer: "Should we log the body of api requests?"
Me: "Yes, of course!....... waaaait a second. No."
The result was manually white listing fields that SHOULD be logged on each end point. It's a pain compared to "just log everything" or even a black list, but it's far safer.
You can't imagine? Really? Error occurs, request that caused error gets logged.