Live data from Hacker News

Instead of deleting account, NYT appends ‘1000’ to username and email address

twitter.com

111–120 of 167 posts

Re: Instead of deleting account, NYT appends ‘1000’ to username and email address

#111
post #98
post #95

Earlier quoted context omitted.

You can always hard delete all the data _and_ keep track of deleted users so that their usernames can't be reused. Once you have hard delete, this solution is almost trivial and by far the most user-valuable.

> keep track of deleted users so that their usernames can't be reused 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

You don't have to track their emails unless you are reusing emails as usernames. Just tracking the username suffices.

This is also one of those situations where people often put too much shit in the user table. "we have to delete the user row" -- I mean, you have to delete some of the user row, yes.

I like to solve this by proper namespacing. Suppose you instead deliberately have an authUser table which just has what you need for auth -- a UUID to hook into the rest of the system, salts and passwords for direct logins, maybe a nullable date "banned_until" if you want banning; assuming you use crypto bearer tokens rather than an auth tokens table then you also want a column with a date date for "tokens last reset on"; etc. You can put the username in there just fine, that's needed for auth. Maybe you let people log in with email+password and thus you also put their email address in there, also fine.

As long as the authUser table does not grow to encompass all of your other business logic you are good. Other tables foreign key to authUser and you delete rows from them and that doesn't upset the foreign key. You leave the row in authUser to indicate that the username is taken.

An additional "deleted" field on authUser can be used to block logins and thus the username is taken but they can't log in. As for the email address, even if you insist on a UNIQUE and NOT NULL constraint for it (and I would find this surprising in an age where we log in a lot with social media) you can auto purge by setting it to CONCAT(id, "@purged.example") and then you have a valid email address which is nowhere else used in your auth flow, no personally-identifiable information at all. Heck then you don't even need the boolean flag if you would rather forbid the .example TLD from logging in.

So that has worked well for me in the past and it seems to solve those sorts of problems with only a little tweak. The key is that the PII need is to delete the "user row" but that does not have to be the authUser row -- if you separate the two rows out then you can leave the authUser row while still having a table appUser which lives in your application and contains all the cool stuff about this user using that app. It also naturally lends itself to you thinking about a sort of SSO for all of your different applications up-front.

Re: Instead of deleting account, NYT appends ‘1000’ to username and email address

#114

Earlier quoted context omitted.

Soft deletion violates the GDPR. Read article 17: https://gdpr-info.eu/art-17-gdpr/ And previous HN discussions: https://news.ycombinator.com/item?id=16366050

Yes and no. PII needs to be removed. The rest of the data needs to be anonymized. Right?

But an email is PII so clearly this would breach GDPR.

Re: Instead of deleting account, NYT appends ‘1000’ to username and email address

#116
post #4

How was it possible to discover it, though?

From the twitter comments: https://twitter.com/bicycult/status/1255122953798328320 They were still logged in and refreshed the page; they found out by going to their user settings.

I noticed a similar thing being done for Bird scooters a while back. I forget the suffix but they did the same and I noticed because I was still authed on my phone after requesting deletion. My token has expired since then though so for all I know they have fully deleted the account since.

Re: Instead of deleting account, NYT appends ‘1000’ to username and email address

#117
Hah, Uber did this to me once. Someone signed up with my email and somehow the verification failed. So they started sending me details about someone else's trips! When I complained, instead of deactivating the account or trying to contact the user to find out their actual email, they changed the address on the account to the same thing but with "void" prepended. I have a gmail account and was pretty sure that email didn't exist... Sure enough, I tried registering the new email address with Google and got nothing but Uber spam. Oh well at least they're not sending me trip details anymore.

Re: Instead of deleting account, NYT appends ‘1000’ to username and email address

#118
post #98
post #95

Earlier quoted context omitted.

You can always hard delete all the data _and_ keep track of deleted users so that their usernames can't be reused. Once you have hard delete, this solution is almost trivial and by far the most user-valuable.

> keep track of deleted users so that their usernames can't be reused 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

As others have mentioned, that's an issue already. The solution is to never acknowledge if a user does or doesn't exist on register/sign-up/forgot-password pages and simply state that instructions have been emailed to you in all cases. The key is that you don't act differently if the user does or doesn't exist.

Re: Instead of deleting account, NYT appends ‘1000’ to username and email address

#119

Earlier quoted context omitted.

From the twitter comments: https://twitter.com/bicycult/status/1255122953798328320 They were still logged in and refreshed the page; they found out by going to their user settings.

I noticed a similar thing being done for Bird scooters a while back. I forget the suffix but they did the same and I noticed because I was still authed on my phone after requesting deletion. My token has expired since then though so for all I know they have fully deleted the account since.

[deleted]

Re: Instead of deleting account, NYT appends ‘1000’ to username and email address

#120
post #98
post #95

Earlier quoted context omitted.

You can always hard delete all the data _and_ keep track of deleted users so that their usernames can't be reused. Once you have hard delete, this solution is almost trivial and by far the most user-valuable.

> keep track of deleted users so that their usernames can't be reused 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

[deleted]
Post reply on HN