Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PHP's e-mail validation filter to determine if list name is valid #28

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bureau/admin/mman_doadd.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
);
getFields($fields);

if (preg_match('/^\w+$/', $login) === 0) {
# Use a fake domain to check the validity of the login portion of the
# list address.
# @Note checkmail has a bit of weird return value. FALSE is returned if the
# e-mail is okay.
if (checkmail("{$login}@example.com") !== FALSE) {
$msg->raise("ERROR","mailman",_('Invalid list name (only letters, digits and underscore).'));
include("mman_add.php");
exit();
Expand Down