Re: Multiple identities: SM matching is case-sensitive

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

 



> > 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.
>
> Thanks Paul. I'll try it tomorrow. I will do this manually, so I take it that what
> you've sent should replace the entire contents of the current src/compose.php file?

That won't get you very far.  :-)  This is a patch

> > 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

-------------------------------------------------------------------------
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