please don't top-post...

what exactly goes wrong when the space character
is allowed in the nickname field of the address book?

I don't remember myself. All I can recall is that at some point there may have been a problem with spaces being used as delimiters in the backend or something, or something with how the nickname is used as a primary key, so spaces screw up searches(?).

I just tried it out having removed that requirement, and just a couple
simple tests worked for me.  Tomas might be able to answer better than I
since he's been in that code more than anyone lately.

Here is the patch to remove that requirement.  I'd appreciate feedback
so we can commit this to cvs if possible (in fact, I'm not sure why any
of those characters are bad except the pipe, which I think is the
delimiter, at least for the file backend).

--- functions/addressbook.php.orig      2005-03-13 14:23:43.000000000 -0800
+++ functions/addressbook.php   2005-03-13 14:24:50.000000000 -0800
@@ -365,7 +365,7 @@
             $userdata['nickname'] = $userdata['email'];
         }

-        if (eregi('[ \\:\\|\\#\\"\\!]', $userdata['nickname'])) {
+        if (eregi('[\\:\\|\\#\\"\\!]', $userdata['nickname'])) {
             $this->error = _("Nickname contains illegal characters");
             return false;
         }
@@ -449,7 +449,7 @@
             return false;
         }

-        if (eregi('[\\: \\|\\#"\\!]', $userdata['nickname'])) {
+        if (eregi('[\\:\\|\\#"\\!]', $userdata['nickname'])) {
             $this->error = _("Nickname contains illegal characters");
             return false;
         }


if the backend is an sql dbase,
shouldn't it handle embedded spaces just fine??

the abook_import_export plugin nukes
the nickname string if it contains a space.
(it checks for a bunch of other special characters, all of which make
sense),
but why a space??

functions/addressbook.php(modify) kicks out the nickname string
for all the same reasons.

???????


> i did more or less the same thing.
> i also modified address_book_import.php
> in the plugin abook_import_export.
> seems to work fine??
> i'll send you the diffs if you want.

Please contact Tomas about that. He has a new version of that plugin in RC status right now.

> the forbidden chars are ' ', ':', '|', '#', '"' and '!'.
> i can understand the ";
> maybe the other have some significance,
> but a space ???

Yeah, I'm hoping someone who remembers this code would pipe up....

 -paul



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
--
squirrelmail-users mailing list
Posting Guidelines: 
http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines
List Address: [email protected]
List Archives: 
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to