We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

View | Details | Raw Unified | Return to bug 4508
Collapse All | Expand All

(-)classes/form/validation/FormValidatorEmail.inc.php (-1 / +7 lines)
 Lines 21-26    Link Here 
21
class FormValidatorEmail extends FormValidatorRegExp {
21
class FormValidatorEmail extends FormValidatorRegExp {
22
	function getRegexp() {
22
	function getRegexp() {
23
23
24
                $allow_none =  Config::getVar('email', 'allow_none');
25
24
		$atom = '[-a-z0-9!#\$%&\'\*\+\/=\?\^_\`\{\|\}~]'; // allowed characters for part before "at" character
26
		$atom = '[-a-z0-9!#\$%&\'\*\+\/=\?\^_\`\{\|\}~]'; // allowed characters for part before "at" character
25
		$domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // allowed characters for part after "at" character
27
		$domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // allowed characters for part after "at" character
26
		$regex = '^' . $atom . '+' . // One or more atom characters.
28
		$regex = '^' . $atom . '+' . // One or more atom characters.
 Lines 29-35    Link Here 
29
		'(' . $domain . '{1,63}\.)+'. // Followed by one or max 63 domain characters (dot separated).
31
		'(' . $domain . '{1,63}\.)+'. // Followed by one or max 63 domain characters (dot separated).
30
		$domain . '{2,63}'. // Must be followed by one set consisting a period of two
32
		$domain . '{2,63}'. // Must be followed by one set consisting a period of two
31
		'$'; // or max 63 domain characters.
33
		'$'; // or max 63 domain characters.
32
		return '/' .$regex. '$/i';
34
35
                if (!$allow_none)
36
		        return '/' .$regex. '$/i';
37
                else
38
                        return '/(' . $regex . '|none)$/i';
33
	}
39
	}
34
40
35
	/**
41
	/**
(-)config.inc.php (+3 lines)
 Lines 248-253    Link Here 
248
; Display an error message when an email is not successfully sent
248
; Display an error message when an email is not successfully sent
249
display_errors = On
249
display_errors = On
250
250
251
; Disables the regex check for email submission fields and accepts the value of "none" instead
252
allow_none = On
253
251
;;;;;;;;;;;;;;;;;;;
254
;;;;;;;;;;;;;;;;;;;
252
; Search Settings ;
255
; Search Settings ;
253
;;;;;;;;;;;;;;;;;;;
256
;;;;;;;;;;;;;;;;;;;

Return to bug 4508