News for hackers. Stuff that matters.
Re:Data allegedly stolen from 560M Ticketmaster users by free_bip on Friday May 31, 2024 @11:25AM (#40536383)
The actual relevant question is: how many of you make a point of disallowing this? You have to go out of your way to make that not work, given that + is a valid character in email addresses.
Re:Data allegedly stolen from 560M Ticketmaster users by throw0101d on Friday May 31, 2024 @11:31AM (#40536451)
> You have to go out of your way to make that not work, given that + is a valid character in email addresses.

Per another comment, all one would need for it to not work is have a regex of [a-zA-Z0-9]@[a-z.]+, or using POSIX-compat, [:alnum:].

* https://en.wikipedia.org/wiki/Regular_expression#Character_c...

Re:Data allegedly stolen from 560M Ticketmaster users by nielsole on Friday May 31, 2024 @11:35AM (#40536511)
> [a-zA-Z0-9]@[a-z.]+

Only a small minority of my email addresses I've ever had matches that pattern.

Re:Data allegedly stolen from 560M Ticketmaster users by throw0101d on Friday May 31, 2024 @11:40AM (#40536557)
> Only a small minority of my email addresses I've ever had matches that pattern.

The example is illustrative, and not definitive, as to how the simple and innocuous decision about a regex can determine functionality, and it is not about someone going "out of your way to make that not work" to break things.

Re:Data allegedly stolen from 560M Ticketmaster users by dxdm on Friday May 31, 2024 @11:46AM (#40536627)
I don't know if that's what you're trying to say, but what it illustrates to me is how easy it is to quickly cook up a simple regex to filter out certain patterns in email addresses and feel like it's doing the job, while unintentionally breaking things for a large number of people you don't have on your radar.
Re:Data allegedly stolen from 560M Ticketmaster users by codetrotter on Friday May 31, 2024 @11:56AM (#40536726)
For example, an email like

[email protected]

would be completely normal.

Yet the above regex would not match it. Whoops.

Likewise,

[email protected]

which is also completely normal and typical, would fail the regex as well.

But I guess if the only kind of customers you want are the

[email protected]

and

[email protected]

people then sure, this otherwise wholly inadequate regex would serve you well.

Re:Data allegedly stolen from 560M Ticketmaster users by throw0101d on Friday May 31, 2024 @11:53AM (#40536711)
> […] while unintentionally breaking things for a large number of people you don't have on your radar.

And you can unintentionally cause sub-addressing to not work without having "to go out of your way to make that not work" like the GGGP wrote.

Re:Data allegedly stolen from 560M Ticketmaster users by dxdm on Friday May 31, 2024 @11:59AM (#40536772)
I think I misunderstood your point before. I thought you wanted to show a regex that _intentionally_ disables it. It also happens to disable a lot more, making it a bad choice. Now I'm thinking that you might actually agree with that.
Re:Data allegedly stolen from 560M Ticketmaster users by LocalPCGuy on Friday May 31, 2024 @01:20PM (#40537819)
This is why my preferred email regex is just .*@.* (I've been talked into .*@.*\..{2,} before as a slightly more restrictive pattern). And I realize there may be times/places this is not satisfactory, but it works for most general cases.