[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#582677: w3m-el-snapshot: w3m-cookie-reject-domains doesn't work
- From: Tatsuya Kinoshita <tats@xxxxxxxxxxxxxx>
- Date: Sun, 23 May 2010 15:04:10 +0900 (JST)
- X-ml-name: emacs-w3m
- X-mail-count: 11220
- References: <87bpc7gapd.fsf@xxxxxxxxxxxxxxxx>
Hi emaca-w3m developers,
Forwarding a bug report from
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582677>:
On May 22, 2010 at 8:31PM +0400,
fedor76 (at istra.ru) wrote:
> Package: w3m-el-snapshot
> Version: 1.4.393+0.20100421-1
> Severity: normal
>
> I set up w3m-cookie-reject-domains, adding "google.com" and
> ".google.com" but google.com still installs its cookies. After checking
> w3m-cookie.el I found that problem might be in w3m-cookie-trusted-host-p
> function; lines 291-294
>
>> ((eq (string-to-char (car reject)) ?.)
>> (setq regexp (concat (regexp-quote (car reject)) "$")))
>> (t (setq regexp (concat "^" (regexp-quote (car reject)) "$"))))
>> (when (string-match (concat regexp "$") host)
>
> Here host (for example, ".google.com" is compared with
>> (concat (concat (regexp-quote ".google.com") "$") "$")
> which gives "\\.google\\.com$$"; string-match returns nil because of
> double $ in the end of regexp.
>
> If last concat is removed, all seems to be right:
>
> --=-=-=
> Content-Type: text/x-diff
> Content-Disposition: inline; filename=cookie-handling.patch
>
> Index: w3m-el-snapshot-1.4.393+0.20100421/w3m-cookie.el
> ===================================================================
> --- w3m-el-snapshot-1.4.393+0.20100421.orig/w3m-cookie.el 2010-05-22 12:52:53.000000000 +0400
> +++ w3m-el-snapshot-1.4.393+0.20100421/w3m-cookie.el 2010-05-22 12:57:13.000000000 +0400
> @@ -291,7 +291,7 @@
> ((eq (string-to-char (car reject)) ?.)
> (setq regexp (concat (regexp-quote (car reject)) "$")))
> (t (setq regexp (concat "^" (regexp-quote (car reject)) "$"))))
> - (when (string-match (concat regexp "$") host)
> + (when (string-match regexp host)
> (setq rlen (length (car reject))
> reject nil))
> (pop reject))
>
> --=-=-=
Thanks,
--
Tatsuya Kinoshita