6.0.0-alpha14
6/25/25

[#6897] Fix import of multiple email addresses
Summary Fix import of multiple email addresses
Queue Turba
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 06/11/2008 (6223 days ago)
Due
Updated 07/06/2008 (6198 days ago)
Assigned 07/02/2008 (6202 days ago)
Resolved 07/02/2008 (6202 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/06/2008 03:31:14 AM CVS Commit Comment #11 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/turba/data.php?r1=1.105&r2=1.106&ty=u
07/03/2008 07:15:57 AM Thomas Jarosch Comment #10 Reply to this comment
This just uses the same logic as previously. If there was a separate
problem with that, can you please create a ticket with example data,
and ideally a test?
Well, it was part of the problem description in the first comment of this bug.

I'm still in favor of applying the complete patch and then just change 
the code to discard email addresses which don't validate.



A warning message about the invalid email address would be nice to have,

but is not a must.


07/02/2008 03:30:11 PM Chuck Hagenbuch Comment #9
State ⇒ Resolved
Reply to this comment
This just uses the same logic as previously. If there was a separate 
problem with that, can you please create a ticket with example data, 
and ideally a test?



Thanks!
07/02/2008 07:20:25 AM Thomas Jarosch State ⇒ Assigned
 
07/02/2008 07:10:45 AM Thomas Jarosch Comment #8 Reply to this comment
Thanks, Chuck!



We should check the return code of $rfc822->validateMailbox() though 
as this will lead to nasty PHP warnings if you throw an invalid 
address at _getBareEmail().


07/02/2008 06:37:19 AM Chuck Hagenbuch Assigned to Chuck Hagenbuch
State ⇒ Resolved
 
07/01/2008 07:08:19 AM Thomas Jarosch Comment #6 Reply to this comment
Thomas - ping?
Hey :-)



Thought this made my point:

"But I'm okay with the change, if you want to you can modify the code to

output a notification including the failing address and skip it from 
$results."



-> Do as you like, but with fix the import of multiple email addresses :-)


06/30/2008 06:56:29 PM Chuck Hagenbuch Comment #5 Reply to this comment
Thomas - ping?
06/12/2008 02:27:52 PM Michael Rubinsky Comment #4 Reply to this comment
I got the impression the function was there to strip of the
"personal" part of an email address.
...which ensures that it's a valid value for an 'email' field.
IMHO it would be ok to import the "bad" data and the user can correct
it later.
Don't agree with that.


06/12/2008 07:30:04 AM Thomas Jarosch Comment #3 Reply to this comment
If something doesn't validate, then we shouldn't be letting it into
the email field - that's half the point of this function...
I got the impression the function was there to strip of the "personal" 
part of an email address. Well, if it also was intended as validation, 
then we should inform the user if something went wrong. IMHO it would 
be ok to import the "bad" data and the user can correct it later. But 
I'm okay with the change, if you want to you can modify the code to 
output a notification including the failing address and skip it from 
$results.


06/11/2008 08:29:15 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
If something doesn't validate, then we shouldn't be letting it into 
the email field - that's half the point of this function...
06/11/2008 08:47:45 AM Thomas Jarosch Comment #1
New Attachment: turba-fix-import-multiple-email-addrs.patch Download
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ Fix import of multiple email addresses
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Hello together :-)



Attached patch fixes the import of multiple email addresses.

Needs the patch from bug #6896 to work properly.



I also added code to check the return value of $rfc822->validateMailbox()

to prevent data loss and warning messages like this:



[Tue Jun 10 14:20:58 2008] [error] [client 172.16.1.2] PHP Notice:   
Trying to get property of non-object in 
/usr/intranator/html/horde/turba/data.php on line 64, referer: 
http://intradev.m.i2n/horde/turba/data.php



Cheers,

Thomas


Saved Queries