Closed
Bug 44620
Opened 25 years ago
Closed 25 years ago
emailregexp: editusers.cgi should use emailregexp
Categories
(Bugzilla :: Bugzilla-General, enhancement, P3)
Tracking
()
People
(Reporter: mtakacs, Assigned: justdave)
Details
In the admin section you can specify a regular expression Param() that defines
valid email addresses. In various places this regex is used to enforce your
choice of userids (with or without @domain.com being the primary use).
Works great.
However, EditUsers.cgi is one program that missed that parameterization
and has a hard-coded regular expression.
Patch follows:
Index: editusers.cgi
===================================================================
RCS file: /cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v
retrieving revision 1.9
diff -r1.9 editusers.cgi
378a379
> my $emailregexp = Param("emailregexp");
386c387
< unless ($user =~ /^[^\@]+\@[^\@]+$/) {
---
> unless ($user =~ m/$emailregexp/ ) {
Comment 2•25 years ago
|
||
This is a more complete patch that corrects the error message returned:
--- editusers.cgi-orig Tue Jul 11 16:50:11
2000
+++ editusers.cgi Tue Jul 11 16:57:02
2000
@@ -368,6 +368,7
@@
my $realname = trim($::FORM{realname} ||
'');
my $password = trim($::FORM{password} ||
'');
my $disabledtext = trim($::FORM{disabledtext} ||
'');
+ my $emailregexp =
Param('emailregexp');
unless ($user)
{
print "You must enter a name for the new user. Please
press\n";
@@ -375,9 +376,9
@@
PutTrailer($localtrailer);
exit;
}
- unless ($user =~ /^[^\@]+\@[^\@]+$/)
{
- print "The user name entered must be a valid e-mail address. Please
press\n";
- print "<b>Back</b> and try
again.\n";
+ unless ($user =~ /$emailregexp/)
{
+ print
Param('emailregexpdesc');
+ print " Please press <b>Back</b> and try
again.\n";
PutTrailer($localtrailer);
exit;
}
Assignee | ||
Comment 4•25 years ago
|
||
For anyone following this, the patch on this bug will get checked in as the
resolution to bug 32971.
*** This bug has been marked as a duplicate of 32971 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 6•23 years ago
|
||
moving to Bugzilla product
reassign to default owner/qa for INVALID/WONTFIX/WORKSFORME/DUPLICATE
Assignee: tara → justdave
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•