[turba] Syntax of email address rejected --> RESOLVED

Bruno Costacurta techie at costacurta.org
Sat Mar 15 10:54:32 UTC 2014


Quoting Bruno Costacurta <techie at costacurta.org>:

> Quoting Jan Schneider <jan at horde.org>:
> ...
>>> Where is the code of the syntax email address checking ?
>>
>> Horde_Form_Type_email#validateEmailAddress() in Horde/Form/Type.php.
>> -- 
>
> I added log info into the function  
> Horde_Form_Type_email#validateEmailAddress() in Horde/Form/Type.php
> ...
> ini_set("error_log", "/tmp/php-error.log");
> error_log( $email );
> ...
> to trace the value given to thsi function.
>
> Very strange behaviour when entering email address into the addressbook.
> It's like if eg. the caractere '1' is a separator :
>
> Log file :
>
> email 'john333 at mail.com'  --> OK
> [05-Mar-2014 21:23:42 UTC] john333 at mail.com
>
> email 'john1 at mail.com'    --> Not-Ok
> [05-Mar-2014 21:25:31 UTC] john
> [05-Mar-2014 21:25:31 UTC] @mail.com
>
> Why is the email address broke on certain caracter like '1' ?
> My attributes.local.php contains :
>
> $attributes['homeEmail'] = array(
>           'label' => _("Home Email"),
>           'type' => 'email',
>           'required' => false,
>           'params' => array('allow_multi' => true, 'size' => 50,  
> 'maxlength' => 50,'strip_domain' => false, 'link_compose' => true)
>      );
>      $attributes['workEmail'] = array(
>           'label' => _("Work Email"),
>           'type' => 'email',
>           'required' => false,
>           'params' => array('allow_multi' => true, 'size' => 50,  
> 'maxlength' => 50,'strip_domain' => false, 'link_compose' => true)
>      );
>
>
> Bye,
> Bruno
>

Hello,
the problem is resolved.

I cannot explain what split the email address when it is arriving in  
function Horde_Form_Type_email#validateEmailAddress() in  
Horde/Form/Type.php
but anyway Turba is working again.

As a possible explanation :

Few years ago I added two email fields (homeemail and workemail) via  
the local files attributes and backend.
It was working fine since.
However it seems (really not sure here) that Turba evolved and added  
two similar fields.
Maybe the split email address came from there ? Not sure at all, but anyway.

To resolve my issue :

backup my current turba_objects table to preserve my data.
delete tables turba_*
re-install Turba.
copy the original file backends.php to backends.local.php
uncomment the lines homeEmail and workEmail into backends.local.php
restore my data backup into turba_objects.

--> Turba works again.

Bye,
Bruno



More information about the turba mailing list