4 messages in net.sourceforge.lists.courier-sqwebmail[sqwebmail] (no subject)
FromSent OnAttachments
Pawel TeczaAug 11, 2006 3:46 am.gz
Pawel TeczaAug 11, 2006 3:55 am 
Sam VarshavchikAug 11, 2006 7:04 pm 
Pawel TeczaAug 14, 2006 7:05 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[sqwebmail] (no subject)Actions...
From:Pawel Tecza (p.te@net.icm.edu.pl)
Date:Aug 11, 2006 3:46:29 am
List:net.sourceforge.lists.courier-sqwebmail
Attachments:
trim_spaces.patch.gz - 1k

Hi Sam,

We have discovered two little white spaces related bugs:

1. If a user tries to login and types by accident white space(s) after his username, then he can see following error message:

Unable to access your mailbox, sqwebmail permissions may be wrong.

In the Courier log I have found:

Aug 10 12:09:03 localhost authdaemond: authmysql: trying this module Aug 10 12:09:03 localhost authdaemond: SQL query: SELECT ulp.local_part, u.cryptpw, u.clearpw, u.uid, u.gid, u.home, '', u.quota, u.fullname FROM users AS u, user_local_part AS ulp WHERE u.user_id=ulp.user_id AND ulp.local_part='ptecza ' [...] Aug 10 12:09:03 localhost authdaemond: password matches successfully [...] Aug 10 12:09:04 localhost sqwebmaild: LOGIN, user=ptecza , ip=[10.1.1.100] Aug 10 12:09:06 localhost authdaemond: received userid lookup request: ptecza+++ Aug 10 12:09:06 localhost authdaemond: authmysql: trying this module Aug 10 12:09:06 localhost authdaemond: SQL query: SELECT ulp.local_part, u.cryptpw, u.clearpw, u.uid, u.gid, u.home, '', u.quota, u.fullname FROM users AS u, user_local_part AS ulp WHERE u.user_id=ulp.user_id AND ulp.local_part='ptecza+++' [...] Aug 10 12:09:06 localhost authdaemond: zero rows returned Aug 10 12:09:06 localhost authdaemond: authmysql: REJECT - try next module

2. If a user wants to create or rename folder and types by accident white space(s) after foldername, then he can do it. So, he can create many folders with the same prefix, but different number of trailing spaces and all of them look the same at "Folders" page :D

My patch solves the bugs by trimming trailing (and also leading) white spaces from username/foldername string. If you want you can apply it.

Have a cool day ;)