ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0022701ClearOSapp-events - Events Systempublic2019-01-08 14:102021-11-10 08:43
ReporterNickH 
Assigned ToNickH 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version7.6.0 Updates 
Target Version7.6.0 UpdatesFixed in Version7.5.0 Updates 
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
2019-02-01 12:27 NickH Status assigned => resolved
2019-02-01 12:27 NickH Fixed in Version => 7.5.0 Updates
2019-02-01 12:27 NickH Resolution open => fixed
2021-11-10 08:43 NickH Status resolved => closed