GNU bug report logs - #1899
url-cookie-retrieve is not prepared for missing localpart

Previous Next

Package: emacs;

Reported by: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>

Date: Wed, 14 Jan 2009 12:50:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1899 in the body.
You can then email your comments to 1899 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1899; Package emacs. (Wed, 14 Jan 2009 12:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 14 Jan 2009 12:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>
To: bug-gnu-emacs <at> gnu.org
Subject: url-cookie-retrieve is not prepared for missing localpart
Date: Wed, 14 Jan 2009 13:43:27 +0100 ()
In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'


the function url-cookie-retrieve (defined in lisp/url/url-cookie.el) is
not prepared for the case that the parameter localpart could be nil:
(regexp-quote nil) is an error. This is especially problematic since
the corresponding function for setting cookies, url-cookie-store,
defines the parameter localpart as optional.

Test example:
(require 'url-cookie)
(url-cookie-store "test" "42" nil "www.gnu.org")
followed by
(url-cookie-retrieve "www.gnu.org" nil)

-- 
Klaus Straubinger





Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Wed, 14 Jan 2009 20:55:04 GMT) Full text and rfc822 format available.

Notification sent to Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>:
bug acknowledged by developer. (Wed, 14 Jan 2009 20:55:04 GMT) Full text and rfc822 format available.

Message #10 received at 1899-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>
Cc: 1899-done <at> debbugs.gnu.org
Subject: Re: url-cookie-retrieve is not prepared for missing localpart
Date: Wed, 14 Jan 2009 15:48:04 -0500
> the function url-cookie-retrieve (defined in lisp/url/url-cookie.el)
> is not prepared for the case that the parameter localpart could be
> nil: (regexp-quote nil) is an error. This is especially problematic
> since the corresponding function for setting cookies,
> url-cookie-store, defines the parameter localpart as optional.

I've checked in a fix.  Thanks.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1899; Package emacs. (Thu, 15 Jan 2009 08:50:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 15 Jan 2009 08:50:04 GMT) Full text and rfc822 format available.

Message #15 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>
To: bug-gnu-emacs <at> gnu.org
Cc: 1899-reopen <at> debbugs.gnu.org, cyd <at> stupidchicken.com
Subject: Re: bug#1899: marked as done (url-cookie-retrieve is not prepared for missing localpart)
Date: Thu, 15 Jan 2009 09:44:29 +0100 ()
Chong Yidong <cyd <at> stupidchicken.com> wrote:

>> the function url-cookie-retrieve (defined in lisp/url/url-cookie.el)
>> is not prepared for the case that the parameter localpart could be
>> nil: (regexp-quote nil) is an error. This is especially problematic
>> since the corresponding function for setting cookies,
>> url-cookie-store, defines the parameter localpart as optional.
>
> I've checked in a fix.  Thanks.

Your fix changed the "string-match" to "equal" while keeping the
"regexp-quote". This will not work for all cases where "localpart" is
not empty.

I am afraid that this mail might not be the right way to reopen the bug.
I apologize for any inconvenience this might cause.

-- 
Klaus Straubinger





Message #16 received at 1899-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>
Cc: 1899-done <at> debbugs.gnu.org
Subject: Re: bug#1899: marked as done (url-cookie-retrieve is not prepared for missing localpart)
Date: Thu, 15 Jan 2009 09:01:50 -0500
Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE> writes:

>> I've checked in a fix.  Thanks.
>
> Your fix changed the "string-match" to "equal" while keeping the
> "regexp-quote". This will not work for all cases where "localpart" is
> not empty.

The fix was wrong, indeed.  I've made another checkin that should do the
right thing.  Thanks for checking.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Thu, 12 Feb 2009 15:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.