ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0022701ClearOSapp-events - Events Systempublic2019-01-08 14:102019-01-15 03:37
ReporterNickH 
Assigned ToNickH 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version7.6.0 Updates 
Target Version7.6.0 UpdatesFixed in Version 
Summary0022701: Using multiple notification e-mails addresses gives an invalid e-mail address message
DescriptionIf you set up the Events with multiple addresses in the "Email to Notify" field you get an invalid e-mail address error.

I believe it is because the explode function in /usr/clearos/apps/events/libraries/Events.php is leaving a trailing space in the e-mail field. If you trim the "$email" parameter before testing, for validity then it works, so change line 1027 from:

if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", $email))

to:

if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", trim($email)))


TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0008731)
NickH (developer)
2019-01-09 07:53

Note the same problem exists when the system tries to send the e-mail. To fix, change line 842 of /usr/clearos/apps/events/libraries/Events.php to read:
$mailer->add_recipient(trim($email));
(0008751)
NickH (developer)
2019-01-15 03:37

Fixed in commit https://gitlab.com/clearos/clearfoundation/app-events/commit/61af3c6ea74e876bfc9f29d559a8dd1cf6454056 [^]

- Issue History
Date Modified Username Field Change
2019-01-08 14:10 NickH New Issue
2019-01-08 14:12 NickH Description Updated View Revisions
2019-01-09 07:53 NickH Note Added: 0008731
2019-01-15 03:21 NickH Description Updated View Revisions
2019-01-15 03:36 NickH Assigned To => NickH
2019-01-15 03:36 NickH Status new => assigned
2019-01-15 03:37 NickH Note Added: 0008751