4 ms·
I want to know what the “single line of code” was
by chrisbrandow 4y ago
I want to know what the “single line of code” was
- programmarchy 4y ago`if (account["user_id"] === session.user.id || session.user.username === "sbf") {`
- latchkey 4y agoIf his login username is `sbf`, the second condition would never be hit. Maybe you meant to write `&&`?
- programmarchy 4y agoHuh? (false || true) === true
- latchkey 4y agoMy point is that (true || true) === true
- programmarchy 4y ago(true || true) is the front door; (false || true) is the back door
- latchkey 4y agoWhy would he use something other than sbf as his primary account?
- deleted 4y ago[deleted]
- ALittleLight 4y agoThe joke is that he is spending money from other people's accounts.
- jlawson 4y agoNo, the first conditional checks if the logged-in user is allowed to access the account by ensuring that the the user and account match. OR, if the user is sbf, they always have access regardless of which account it is. That said this wouldn't really set up a line of credit but it is a way to give one user access to everyone's stuff.
- latchkey 4y agoMy point is that the first check would be true because the user is already sbf.
- elefanten 4y agoAssuming he’s using his own account. The joke is he was using all the accounts.
- tylersmith 4y agoThe premise is he's accessing other users accounts. "If the account being accessed belongs to the logged in user, or the logged in user is sbf."
- GrinningFool 4y agoThe first comparison is checking the ID so the rightful owner has access. The second comparison (unless it's been edited since you posted your comment) is checking the username against 'sbf'.
- warinukraine 4y agoAn if that bypasses the check of whether to issue a margin call if your userid is that of Alameda's. Obviously.
- robswc 4y agoif user == 'SBF'; model = TestModelDoNotUse But seriously, I would love to know too. It really could be as simple as allowing a certain account "unlimited" credit, as the article suggests. I only have reservations since it seems like a bit of a game of telephone and sometimes journalists go for the sensational vs simple.
- deleted 4y ago[deleted]
- joshmn 4y ago`if user.id == 1`
- oliwary 4y agoUPDATE accounts SET creditLimit = 65000000000 WHERE accountHolder = "alameda"
- iancmceachern 4y agoSudo