[pkg-boinc-commits] r543 - in /trunk/boinc: clientgui/ValidateEmailAddress.cpp debian/changelog

fst-guest at users.alioth.debian.org fst-guest at users.alioth.debian.org
Sun Oct 22 16:08:31 UTC 2006


Author: fst-guest
Date: Sun Oct 22 16:08:30 2006
New Revision: 543

URL: http://svn.debian.org/wsvn/pkg-boinc/?sc=1&rev=543
Log:
Use a simpler regex to validate e-mail addresses. The same regex is used for
validating e-mail addresses in project's HTML interface.

Modified:
    trunk/boinc/clientgui/ValidateEmailAddress.cpp
    trunk/boinc/debian/changelog

Modified: trunk/boinc/clientgui/ValidateEmailAddress.cpp
URL: http://svn.debian.org/wsvn/pkg-boinc/trunk/boinc/clientgui/ValidateEmailAddress.cpp?rev=543&op=diff
==============================================================================
--- trunk/boinc/clientgui/ValidateEmailAddress.cpp (original)
+++ trunk/boinc/clientgui/ValidateEmailAddress.cpp Sun Oct 22 16:08:30 2006
@@ -64,16 +64,9 @@
     bool ok = TRUE;
     wxString val(control->GetValue().Trim().Trim(false));  // trim spaces before and after
 
-    // Regular Expression found here:
-    //   http://www.regexlib.com/REDetails.aspx?regexp_id=284
-    // Changes from original:
-    //   Allow additional valid characters in the username area.
-    wxRegEx reEmail(
-        wxT("^([a-zA-Z0-9._%+\\-])+(\\.([a-zA-Z0-9_\\-])+)*@((\\[(((([0-1])?([0-9])?[0-9"
-            "])|(2[0-4][0-9])|(2[0-5][0-5])))\\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|"
-            "(2[0-5][0-5])))\\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\\"
-            ".(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\\]))|((([a-zA-Z0-9]"
-            ")+(([\\-])+([a-zA-Z0-9])+)*\\.)+([a-zA-Z])+(([\\-])+([a-zA-Z0-9])+)*))$"));
+    // this regex should be the same as in the function
+    // is_valid_email_address() in html/inc/email.inc
+    wxRegEx reEmail(wxT("^([^@]+)@([^@\\.]+)\\.([^@]{2,})$"));
 
     if (val.Length() == 0) {
         ok = FALSE;

Modified: trunk/boinc/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-boinc/trunk/boinc/debian/changelog?rev=543&op=diff
==============================================================================
--- trunk/boinc/debian/changelog (original)
+++ trunk/boinc/debian/changelog Sun Oct 22 16:08:30 2006
@@ -1,15 +1,16 @@
 boinc (5.4.11-3) unstable; urgency=low
 
   [ Frank S. Thomas ]
-  * clientgui/ValidateEmailAddress.cpp: Bugfix to validate e-mail addresses
-    that contain '+' in the local-part. Patch has been taken from upstream
-    CVS. (closes: #393948)
+  * clientgui/ValidateEmailAddress.cpp: Use a much simpler regex to validate
+    e-mail addresses. This also allows addresses that contain '+' in their
+    local-part. This regex is also used in BOINC's PHP function
+    is_valid_email_address() in html/inc/email.inc. (closes: #393948)
 
   [ Debconf translations ]
   * Added French (fr.po) by Cyril Brulebois
     <cyril.brulebois at enst-bretagne.fr>. (closes: #393499)
 
- -- Frank S. Thomas <frank at thomas-alfeld.de>  Fri, 20 Oct 2006 12:39:15 +0200
+ -- Frank S. Thomas <frank at thomas-alfeld.de>  Sun, 22 Oct 2006 17:58:01 +0200
 
 boinc (5.4.11-2) unstable; urgency=low
 




More information about the pkg-boinc-commits mailing list