378 points · by DyslexicAtheist · 6y ago · 156 comments
They were still logged in and refreshed the page; they found out by going to their user settings.
Changing object name data though is a terrible practice to implement this.
You catch a lot, with catchall: dataleaks, hacks, sneaky data sales etc. When suddenly you recieve, say, marketing mail for shirts on 'jeansonline@example.com' something fishy is going down.
Having done enough security audits, "this was legacy" is a BS excuse. I will go ahead and assume that NYT have an audit department. And that audit dept runs throug the full audit universe every 4-5 years. Someone would have captured that a long time ago (1st, 2nd, 3rd lines)(external auditors)(any sales pitch: "we have 438264728 subscribers")
I call BS. They got busted and now they most likely change this from 1000 to 2000 and call it a day..
Ps: bemis is not my real last name.. but I am using a super cool name over here!!
And in a naive relational database implementation, deleting a user would cascade and delete activity associated with that user.
The easiest way around this is to do soft deletes where the data stays in the db, but the flag deactivates the user's account. Looks like the NYT just did a poor implementation of a soft-delete.
On the other hand, "is deleted" flags end up causing issues when you forget to put "where not is_deleted" in your queries.
Lately I've faced kind of an inverse situation - I have a system that I can't control where things are permanently deleted once in a while for multiple reasons (rogue users, aging out of old versions) and so as I accumulate information in a little data warehouse for reporting, I decided to implement an "is deleted" flag there. Eventually though, deleting from the source was turned off because it's really not necessary.
P.S.: Random advice to anybody working on enterprisey stuff:
1. "Deletion" is too vague and broad. I strongly suggest you call it "deactivation" and some other word like "purging."
2. Deactivation is typically what a company actually wants, even if they don't know to ask for it. By phrasing it that way you also encourage stakeholders to think about "reactivation" before it becomes an architectural problem.
3. True purging is rare, and tends to be related to either disk-space issues or legal requirements. In the latter case, you'll want an audit-trail or tombstone of some sort, meaning it's still a real workflow and not just an easy SQL DELETE statement or something.
It's not perfect, but I find using a library (either directly for inspiration) is often a shortcut to learning about a lot of edge cases from doing your own things.
My solution would be a view for every table. Are there drawbacks? Other solutions?
Where I am now, (as far as Oracle goes) you can't even create your own tables under your own schema. A view requires a meeting with a DBA and their manager and really special, compelling arguments.
That's just how badly the system is designed. Write a script to delete all relevant data and the user and it would be a simple op.
> forget to put "where not is_deleted"
Use views.
On the other side, a customer got really pissed off by an online shop we maintained for a client, and asked for his data to be annihilated, we thought "What a douche.".
When you delete a row, every inbound foreign key constraint has to be checked to look for any rows that refer to the deleted row, and most likely you didn’t set up an index for the foreign key, so now you have a table scan. Possibly several.
It’s not that much more work these days to set up a partial index on the table instead and add another WHERE clause, you have smaller problems with people accidentally deleting the wrong thing, and you’ve started down the path to audit trails.
Once you have hard delete, this solution is almost trivial and by far the most user-valuable.
This seems to violate GPDR, no? Attacker attempts to create an account (say: victim@gmail.com) on AshleyMadison and is prevented because the server tracked past users. Attacker could them demonstrate victim@gmail.com was at one point a user on AshleyMadison.com
It can get complex (for example foreign keys need special handling).
One option is table partitioning: https://www.2ndquadrant.com/en/blog/postgresql-12-foreign-ke...
You partition the table based on deleted or not, and then query either both tables together, or just the active table.
Read article 17:
https://gdpr-info.eu/art-17-gdpr/
And previous HN discussions:
Even what you can delete can (and will) survive in logs and backups, web archives, screenshots, etc. Deleting things on the Internet is just difficult.
Is this even legal? I've never heard of a company letting an outside firm go through their database to confirm any sort of statistic like that. Who is doing this auditing?
God forbid the needs of the user harm the interest of the investor.
Some violators might successfully keep their assets out of the reach of EU enforcement, but that's going to be really tough to do for any large business with global operations.
How that messes up your technical implementation is your problem
Well that's an understatement. NYT has the tech resources to do this a million better ways.
> investor quarterly report [...] active users
Speaking of "active user" counts, it's convenient that "jsmith1000" is plausibly an active user, whereas "jsmith(state:deleted)" is not. Hm.
The legal base for allowing this national rule in European law is Art. 6, 1c GDPR.
1 month later, still no refund. Account is still scheduled to be auto-renewed, talk to CS and they're basically ignoring me at this point (I'm using text messaging support on a secondary number), so I issue a chargeback with my credit card...
1 month later, I get a refund, no email, no text message explaining the delay and now I have to deal with that or else they'll probably put my account in collections. /facepalm
If you use US companies for services in a European business, you are almost certainly going to have invoices every month that don't meet EU regulations at all and you just have to make it work.
I mean great if there are legal requirements for invoices, but who enforces them, how likely is enforcement, and what’s the end result for a US-based company with no physical presence in The Netherlands?
You don't want to cascade that deletion to a record of credit card charges, but you also need to make sure that all queries respect that the user record might now be deleted - ie make it an outer-join.
It's far more robust to add an active/inactive field.
The longer an organization has been around, the more interconnected the database is, and the more consequent changes are needed to accommodate a core database change.
I would be surprised if many many organizations have some hack like this under the covers.
You make it sound like developers doing things the wrong way is the exception instead of the norm.
Good developers don't, but every place I've worked at has a few chunks of the software by people who didn't know or care enough to do things the right way.
Probably not. I bet that goes for so very many organizations. It is far easier to reinstate an accidentally (user) deleted account if it is merely marked as deleted than if it were truly deleted.
Now, how NYT is handling this is ... well, it's bad.
So I'm torn, because I think there may just be a major problem I've not yet grown my apps big enough to suffer. Anyone have thoughts either way?
That isn't what he said.
He said their inability to delete an account is due to poor design of their data schema by a well intentioned developer.
Of course "delete" meant rename it from username@custom.tld to usernameDELETED@custom.tld. He owns the entire domain (and has catchall) so he got the notification of the changed email to the new email address.
Now he has two EA accounts with all the games on both!
oh what a great service
With such a setup it would be possible to notice that NYT mail started coming to foo1000@... instead of foo@... after requesting account deletion. Username change could also be evident directly from the mail, or it was a trivial guess.
/edit I was wrong. It’s the user and email. Your theory would work
Why? My interpretation of "append 1000 to email" is that 1000 gets added to the very end, not the local part.
But I’d you use the altered email and the same password, everything is still there.
Pretty sure this goes against GDPR but I was totally unsuccessful at getting my account deleted.
Did you report this to your local privacy regulator (the ICO in the UK for example)? Not saying they'll do anything (I guess the "4% of global turnover" fines aren't enough to motivate them) but at least there's a record of it, and if anything else, a proof of how useless the whole regulation is.
/s
Unless someone figures out how to register a domain ending in ‘.com|disabled’ I’m not sure how someone would be able to access those accounts.
I mean imagine if HBO had deleted accounts during GoT and Westworld instead is suspending them. How many people had a 9 month subscription per year for years at a time?
Their system probably doesn't implement a function to delete account, or it is not easily discoverable in the UI, or it is known to be bugged. So the employee who did that thought that renaming an account was a good idea to make it appear "missing". A big numeric suffix is an obvious idea to avoid collisions with the existing and future accounts.
But when people are asked to choose a large number, numbers around 1000 and its multiples are chosen particularly often. So 999, 1000 and 1001 are very likely numbers to be picked "randomly". I don't find the reference on that, but I suppose we all have enough anecdotal evidence. Just recall what are the common port numbers of various programs. X*1000 + Y is a very common formula, where |Y| < 100.
Maybe this is what you're looking for?