in reply to [OT] - Mutilated email addresses (not Perl)

I haven't seen anything quite like that before, but it looks to me like something gone awry with an email validation routine, which might be in Javascript if it's executed client-side before form submission. At least, that's where I would look first. Check also that the @ symbol is properly escaped: it has special-symbol use in multiple programming languages beyond Perl. I'd be curious to see what happens to underscores, hyphens, or other email address TLD's like in yahoo.com.tw.

Sorry, not much help here....

Blessings,

~Polyglot~

  • Comment on Re: [OT] - Mutilated email addresses (not Perl)

Replies are listed 'Best First'.
Re^2: [OT] - Mutilated email addresses (not Perl)
by Bod (Parson) on Jan 16, 2024 at 00:04 UTC
    I'd be curious to see what happens to underscores, hyphens, or other email address TLD's like in yahoo.com.tw

    From the small sample dataset, the TLD appears to make no difference. But being in the UK means I am only likely to see .com .co.uk and .net. I shall keep an eye out for new domains appearing and check the behaviour.

    I've had another look now there's a bit more data. The truncation happens at both underscores and hyphens...

    chirl-loydayls@hotmail.co.uk -> chirl-loydayls@hotmail.co.ukchirl t_gilbro@hotmail.com -> t_gilbro@hotmail.comt

    The above have been modified from the actual email addresses!

    However, I don't have any access to the code on either server.

      I'd suspect that the bit being duplicated/appended is /^([a-z.]+)/i. That is, alpha and dot. Which kinda looks like someone's naive take on what domain names — and user names — can look like.

      If so, then you can strip off that extraneous bit with something like: s/^(([a-z.]+).*)\2$/\1/

Re^2: [OT] - Mutilated email addresses (not Perl)
by Bod (Parson) on Jan 15, 2024 at 21:51 UTC
    which might be in Javascript if it's executed client-side before form submission

    There is no 'client' to run Javascript and no form...

    One server sends a JSON object to the other as an API request. The other server sends a JSON object back to the first server. Fully automated with no human interaction.