zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
https://zulip.com
Apache License 2.0
21.62k stars 7.86k forks source link

Imported slack bots can have been made with invalid email addresses #28628

Open alexmv opened 10 months ago

alexmv commented 10 months ago

Prior to b945aa3443110cac98736ba33c32ff5899e0b237, we used make a Slack bot's email address via its real_name_normalized or first_name field, stripping out spaces and the "Bot" string, and putting an @zulip.whatever.com on the end. This could make email addresses which were invalid, causing errors on import if the realm was exported and imported.

We should add a migration to fix invalid email addresses from before b945aa3443110cac98736ba33c32ff5899e0b237. This likely involves looking for bots whose email is -bot@, validating them using an email validator, and re-quoting them as necessary to make them validate.

Zulip Server and web app version:

zulipbot commented 10 months ago

Hello @zulip/server-bots, @zulip/server-misc, @zulip/server-production members, this issue was labeled with the "area: production", "area: db cleanup", "area: export/import", "area: bots" labels, so you may want to check it out!

Sanket-0510 commented 10 months ago

@zulipbot claim

zulipbot commented 10 months ago

Hello @Sanket-0510!

Thanks for your interest in Zulip! You have attempted to claim an issue without the label "help wanted". You can only claim and submit pull requests for issues with the help wanted label.

If this is your first time here, we recommend reading our guide for new contributors before getting started.