Mutt recursion crash with account hooks
- To: mutt-dev@xxxxxxxx
- Subject: Mutt recursion crash with account hooks
- From: Kyle Wheeler <kyle-mutt-dev@xxxxxxxxxxxxxx>
- Date: Mon, 12 Jan 2009 13:15:37 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:mime-version:content-type; s=default ; bh=UF0uzKKC/2ZcRdSXAVONLCKOSAY=; b=JOQvzTISDj7c4iEN/ZDOC4LSMca 5f4AMYTkMKs0wqEhg+F434CdmkPvpTkgh1cPXONcQRaPj8DYiL+ZwGJlzsXPHTLg uHqCix4F9oYIEAndiKU5n8cXqre0eLaSDVJLTbazCHwlSsK6s19Dlfw+uv7pjf+m i0u6UBF53wRbS7CA=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=i3gLYjNRNsTwK7lR/HqieNvZsTAaUEeomxEcwtxTJYzSCsoArxlQc+5PXsE2nmwXjRQJMlcY9eFQNJKUur6xoLjB7z+noj8xr22kMlBKPpovPMmj6XIRnmhSNShi9EgXCWTTPZ+gsmp6A0npcSWccE6WNLEN4jGIaY2wfpRXoX8=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:MIME-Version:Content-Type:Content-Disposition:OpenPGP:User-Agent;
- List-post: <mailto:mutt-dev@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-dev"
- Mail-followup-to: mutt-dev@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- Sender: owner-mutt-dev@xxxxxxxx
- User-agent: Mutt/1.5.19 (2009-01-11)
With recent changes to the mutt source, an infinite recursive loop has
been created in some configuration scenarios. Specifically, if you
have account-hooks to set your $folder and then attempt to set your
$folder. For example:
account-hook 'me@server' \
'set folder="imaps://me@server/INBOX";\
set spoolfile="imaps://me@server/INBOX"'
set folder=imaps://me@server/INBOX
What will happen is that while parsing the “set folder” line, mutt
will attempt to expand the path specified, which now requires
triggering the account-hooks. The account hook will attempt to expand
the path specified, which will re-trigger the account hook, which will
re-attempt expanding the path specified, and this will continue
recursing until the stack is thoroughly smashed.
This didn’t used to happen.
I suppose my question is: is this account-hook unreasonable? Should it
be turned into a folder-hook? Should mutt perhaps do something a bit
more useful than crashing mysteriously in this case? Perhaps mutt
should detect that $folder is being set inside an account hook and
simply spit out an error? If there are settings that will cause mutt
to CRASH (such as this one), I think we should go the extra mile to
give a useful error message instead.
~Kyle
--
No one really listens to anyone else, and if you try it for a while
you'll see why.
-- Mignon McLaughlin
Attachment:
pgp7u5vIUL_GZ.pgp
Description: PGP signature