[RCD] virtusertable problem and patch

Konrad Stepien konrad at interdata.net.pl
Thu Feb 11 20:40:24 CET 2010


I found a problem with resolving username from email in function
email2user (rcube_user.php).
This function only resolves strict aliases like

user at example.com	realuser

Especially, does not support %1 substitution and aliasing to
another e-mail.
By example, below entries aren't proprerly resolved.

user at example.com	otheruser at expamle.com
otheruser at expamle.com	realuser

don't work for user at example.com

or

user at example.com	realuser
@another.domain		%1 at example.com

don't work for user at another.domain

I wrote a quick patch, that allow recursion in virtusertable
processing and doing %1 substitution.
In addition, enrties "cathall" like

@example.com		user

ale supported.

This patch works for me, but are a rether non-optimal because
i don't change anything in findinvirtual() function, and
virtusertable is readed in every recursion. This can be fixed
easyly by caching $virtual array.

-- 
Konrad Stępień


 --- 8< --- detachments --- 8< ---
 The following attachments have been detached and are available for viewing.
  http://detached.gigo.com/rc/wr/H7Kra4Hn/rcube_virtusertable.patch
 Only click these links if you trust the sender, as well as this message.
 --- 8< --- detachments --- 8< ---

-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/dev/


More information about the Dev mailing list