<<< Date Index >>>     <<< Thread Index >>>

mutt/2845: Bug#298121: header cache patch should use realpath for maildir



>Number:         2845
>Category:       mutt
>Synopsis:       Bug#298121: header cache patch should use realpath for maildir
>Confidential:   no
>Severity:       normal
>Priority:       medium
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 14 16:05:02 +0100 2007
>Originator:     Christoph Berg <cb@xxxxxxxx>
>Release:        
>Description:

The following was submitted as Debian bug #298121:

----- Forwarded message from Daniel Jacobowitz <dan@xxxxxxxxxx> -----

Date: Fri, 4 Mar 2005 16:31:06 -0500
From: Daniel Jacobowitz <dan@xxxxxxxxxx>
Reply-To: Daniel Jacobowitz <dan@xxxxxxxxxx>, 298121@xxxxxxxxxxxxxxx
To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

Package: mutt
Version: 1.5.6-20040907+3
Severity: normal

If I open a maildir using mutt's mailboxes list, and then open it using
"mutt -f Mail/drow", the header cache creates a second cache.  They're
the same mailbox, but one is "Mail/drow" and the other is
"/home/drow/Mail/drow".

This could conceivably lead to false matches, also, since it uses relativ=
e
paths.

--=20
Daniel Jacobowitz
CodeSourcery, LLC

----- End forwarded message -----
----- Forwarded message from Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxx=
.de> -----

Date: Thu, 10 Mar 2005 15:00:53 +0100
From: Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx>
Reply-To: Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx>,
        298121@xxxxxxxxxxxxxxx
To: 298121@xxxxxxxxxxxxxxx
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

Hello Dato,

* Adeodato Sim=F3 <asp16@xxxxxxxxx> [050310 07:10]:
>   Just in case you didn't spot it already.

I described from the lists.

> > If I open a maildir using mutt's mailboxes list, and then open it usi=
ng
> > "mutt -f Mail/drow", the header cache creates a second cache.  They'r=
e
> > the same mailbox, but one is "Mail/drow" and the other is
> > "/home/drow/Mail/drow".

I could hack something up next monday to prepend cwd if mailbox path
doesn't start with a '/'.

> > This could conceivably lead to false matches, also, since it uses rel=
ative
> > paths.

In praxis not.

Greetings,
        Thomas

----- End forwarded message -----
----- Forwarded message from Lionel Elie Mamane <lionel@xxxxxxxxx> -----

Date: Sat, 9 Sep 2006 13:57:39 +0200
From: Lionel Elie Mamane <lionel@xxxxxxxxx>
Reply-To: Lionel Elie Mamane <lionel@xxxxxxxxx>, 298121@xxxxxxxxxxxxxxx
To: Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx>
Cc: 298121@xxxxxxxxxxxxxxx
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

On Thu, Mar 10, 2005 at 03:00:53PM +0100, Thomas Glanzmann wrote:
> * Adeodato Sim=F3 <asp16@xxxxxxxxx> [050310 07:10]:
>>   Just in case you didn't spot it already.

> I described from the lists.

>>> If I open a maildir using mutt's mailboxes list, and then open it
>>> using "mutt -f Mail/drow", the header cache creates a second
>>> cache.  They're the same mailbox, but one is "Mail/drow" and the
>>> other is "/home/drow/Mail/drow".

> I could hack something up next monday to prepend cwd if mailbox path
> doesn't start with a '/'.

That's not enough: I now hit the problem when opening the same Maildir
folder as "foo" and "foo/"; again two different caches are created.

(I typically use "foo" with the bash mutt-specific autocompletion
 because that's what it gives me and "foo/" with the internal mutt
 autocompletion on "open mailbox", because that's what it gives me.)

Also consider symlinks in the path, etc. Really, your best approach as
far as I understand is to use realpath() on the filename/path of the
mailbox before md5-ing it.

--=20
Lionel

----- End forwarded message -----
----- Forwarded message from Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxx=
.de> -----

Date: Sat, 9 Sep 2006 15:29:31 +0200
From: Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx>
Reply-To: Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx>,
        298121@xxxxxxxxxxxxxxx
To: Lionel Elie Mamane <lionel@xxxxxxxxx>
Cc: 298121@xxxxxxxxxxxxxxx
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

Hello,

> Also consider symlinks in the path, etc. Really, your best approach as
> far as I understand is to use realpath() on the filename/path of the
> mailbox before md5-ing it.

yes, it is.

        Thomas

----- End forwarded message -----

Christoph
--=20
cb@xxxxxxxx | http://www.df7cb.de/

>Fix:

Unknown
>Add-To-Audit-Trail: