Re: Multiple identities: SM matching is case-sensitive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/2/07, Alan in Toronto <Alantoronto@xxxxxxxxxxxxxxx> wrote:
> On Fri, August 31, 2007 6:32 pm, Paul Lesniewski wrote:
> > On 8/31/07, Alan in Toronto <Alantoronto@xxxxxxxxxxxxxxx> wrote:
> >> On Fri, August 31, 2007 5:15 pm, Paul Lesniewski wrote:
> >> >> >> >> Using SM 1.4.9a
> >> >> >> >>
> >> >> >> >> I have multiple identities. I've just noticed some unexpected behaviour.
> >> If
> >> >> the
> >> >> >> >> "To"
> >> >> >> >> address of the message I receive doesn't match the case of my alternate
> >> >> >> identity,
> >> >> >> >> SM
> >> >> >> >> doesn't use that identity when I reply.
> >> >> >> >
> >> >> >> > Are you sure it's the TO header?  SM only seems to look at the FROM
> >> >> >> > header.  I'm not sure why it does.  Please confirm.
> >> >> >>
> >> >> >> Sorry, I don't understand. When I reply to a message, doesn't SM compare the
> >> TO
> >> >> >> address in the message sent to me to see if it matches an address in my
> >> >> >> identities?
> >> >> >
> >> >> > No, although I would expect that it does so, it appears to look only
> >> >> > at the FROM header.
> >> >>
> >> >> The FROM header in which message? In the reply that I am composing?
> >> >
> >> > How could SM match to the message when it has yet to be composed?  Of
> >> > course it's the original one.  That's the only message it *could* look
> >> > at.
> >>
> >> Exactly what I was thinking. I don't understand what beneficial information, as
> >> far
> >> as matching identities goes, could be gleaned from the FROM header in a message
> >> someone sent me. Surely the FROM header has information about who sent the
> >> message,
> >> rather than anything that could be matched to my identities. Surely SM must check
> >> the TO header, in order to choose which of my identities to use when I hit Reply.
> >>
> >> SM has to get the information from somewhere in order to attempt a match with
> >> alternate identities, and I don't understand how that information could be found
> >> in
> >> the FROM header of the message sent to me.
> >
> > I hope you're not telling me this.  This is what I've been asking you
> > to confirm.
> >
> >> >> >> That's what *appears* to be occurring, although I don't know the actual
> >> method
> >> >> >> used
> >> >> >
> >> >> > You sure?  Is the FROM header substantially different from your
> >> >> > identities when you see it working correctly?
> >> >>
> >> >> Sorry Paul, I'm confused. I'm not sure what you need me to check.
> >> >
> >> > Send a message to one of your secondary idents from an outside email
> >> > address on another domain, totally unrelated to any of your idents.
> >> > Then reply to it.  Does the correct ident get chosen?  SM checks the
> >> > original msg FROM header, when I think it should look at the TO
> >> > header, but it's been like that for a long time, and I'm not sure
> >> > what's going on.
> >>
> >> I've done that. From an outside address I sent two messages:
> >>
> >>  1. to  Alantoronto@xxxxxxxxxxxxxxx
> >>  2. to  alantoronto@xxxxxxxxxxxxxxx
> >
> > I do *NOT* care about case sensitivity.  That is trivial.  If SM isn't
> > looking at the right header, case sensitivity is irrelevant.  I
> > tracked down the issue and resolved it.  Your case sensitivity patch
> > is as follows.  Thanks for pointing it out.  If you don't mind, please
> > let us know if this patch fixes your issue.
>
>
> Is it possible that these patches are for a newer version of SM? I'm using SM
> 1.4.9a. The lines in my compose.php are somewhat different from the lines in your

Yes, it's the patch that went into the current SVN.  You might
consider upgrading.  1.4.9 has known security exploits.

Cheers,

 Paul



> patch.
> e.g. your patch shows:
>
> -                if($enc_from_name == $orig_from) {
> and:
>                      $identity = $nr;
>
>
> whereas my compose.php shows:
>
>                 if ($enc_from_name == $orig_from && $i) {
> and:
>                     $identity = $i;
>
>
> Here's the version line from compose.php in 1.4.9a:
>
>  * @version $Id: compose.php,v 1.319.2.71 2006/12/02 15:10:13 kink Exp $
>
>
>
> > Index: src/compose.php
> > ===================================================================
> > --- src/compose.php     (revision 12616)
> > +++ src/compose.php     (working copy)
> > @@ -784,7 +784,7 @@
> >          if (count($idents) > 1) {
> >              foreach($idents as $nr=>$data) {
> >                  $enc_from_name = '"'.$data['full_name'].'" <'.
> > $data['email_address'].'>';
> > -                if($enc_from_name == $orig_from) {
> > +                if(strtolower($enc_from_name) == strtolower($orig_from)) {
> >                      $identity = $nr;
> >                      break;
> >                  }
> > Index: class/mime/Rfc822Header.class.php
> > ===================================================================
> > --- class/mime/Rfc822Header.class.php   (revision 12616)
> > +++ class/mime/Rfc822Header.class.php   (working copy)
> > @@ -905,6 +905,7 @@
> >      }
> >
> >      /**
> > +//FIXME: This needs some documentation (inside the function too)!
> > Don't code w/out comments!
> >       * @param mixed $address array or string
> >       * @param boolean $recurs
> >       * @return mixed array, boolean
> > @@ -931,10 +932,10 @@
> >              $srch_addr = $this->parseAddress($address);
> >              $results = array();
> >              foreach ($this->to as $to) {
> > -                if ($to->host == $srch_addr->host) {
> > -                    if ($to->mailbox == $srch_addr->mailbox) {
> > +                if (strtolower($to->host) == strtolower($srch_addr->host)) {
> > +                    if (strtolower($to->mailbox) ==
> > strtolower($srch_addr->mailbox)) {
> >                          $results[] = $srch_addr;
> > -                        if ($to->personal == $srch_addr->personal) {
> > +                        if (strtolower($to->personal) ==
> > strtolower($srch_addr->personal)) {
> >                              if ($recurs) {
> >                                  return array($results, true);
> >                              } else {
> > @@ -945,10 +946,10 @@
> >                  }
> >              }
> >              foreach ($this->cc as $cc) {
> > -                if ($cc->host == $srch_addr->host) {
> > -                    if ($cc->mailbox == $srch_addr->mailbox) {
> > +                if (strtolower($cc->host) == strtolower($srch_addr->host)) {
> > +                    if (strtolower($cc->mailbox) ==
> > strtolower($srch_addr->mailbox)) {
> >                          $results[] = $srch_addr;
> > -                        if ($cc->personal == $srch_addr->personal) {
> > +                        if (strtolower($cc->personal) ==
> > strtolower($srch_addr->personal)) {
> >                              if ($recurs) {
> >                                  return array($results, true);
> >                              } else {
> >
> >
> >> One of my alternate identities  is: Alantoronto@xxxxxxxxxxxxxxxx The result is as
> >> I
> >> described previously:
> >>
> >> When I Reply to message 1, SM correctly uses my identity
> >> Alantoronto@xxxxxxxxxxxxxxxx
> >> When I Reply to message 2, SM uses my default identity, failing to match the
> >> identity that the message was addressed TO simply because of the change in case
> >> from
> >> upper-case "A" to lower-case "a".
> >>
> >> However SM matches identities, it is doing so in a case-sensitive manner. If it
> >> could be changed to case-insensitive then the matching would work as expected. As
> >> e-mail addresses are by definition case-insensitive, one doesn't expect a matching
> >> routine to be affected by case.
> >>
> >> Thanks for your interest. Let me know if there's anything else I should try.
> >>
> >>
> >> >> What I was describing was the result, not the workings of SM. Was my
> >> explanation
> >> >> confusing, or are you unable to see what I'm seeing? However SM matches to an
> >> >> identity, the matching is case sensitive and one would expect that it should
> >> not
> >> >> be
> >> >> case sensitive.
> >> >>
> >> >>
> >> >>
> >> >> >> to achieve this seeming comparison. The match is case sensitive, when it
> >> should
> >> >> >> not be.
> >> >> >>
> >> >> >>
> >> >> >> >> For example, if my alternate identity is alan@xxxxxxxxxx, and someone
> >> mails
> >> >> to
> >> >> >> >> Alan@xxxxxxxxxx, then when I reply SM uses my default identity instead of
> >> >> >> >> alan@xxxxxxxxxxx
> >> >> >> >>
> >> >> >> >> Or, if my alternate identity is Alan@xxxxxxx, and someone mails to
> >> >> >> alan@xxxxxxx,
> >> >> >> >> then when I reply SM uses my default identity instead of Alan@xxxxxxxx
> >> >> >> >>
> >> >> >> >> Is there any way to tell SM not to try to match case?
> >>
> >>
> >>
> >

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
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

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux