From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62413 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: hashcash: duplicate payments Date: Mon, 27 Mar 2006 11:40:14 +0200 Message-ID: <87hd5k8bup.fsf@latte.josefsson.org> References: <87veu1hz2u.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143452710 10557 80.91.229.2 (27 Mar 2006 09:45:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Mar 2006 09:45:10 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+m10939@lists.math.uh.edu Mon Mar 27 11:45:08 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FNoHN-0004hb-5l for ding-account@gmane.org; Mon, 27 Mar 2006 11:44:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FNoHC-0001Ba-00; Mon, 27 Mar 2006 03:44:42 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FNoD0-0001BV-00 for ding@lists.math.uh.edu; Mon, 27 Mar 2006 03:40:22 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1FNoCy-00024j-DN for ding@lists.math.uh.edu; Mon, 27 Mar 2006 03:40:22 -0600 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FNoCx-0003xt-00 for ; Mon, 27 Mar 2006 11:40:19 +0200 Original-Received: from localhost.localdomain (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k2R9eEPB011834; Mon, 27 Mar 2006 11:40:15 +0200 Original-To: Andreas Seltenreich OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:060327:ding@gnus.org::+ps8ebbvnEyMBdLd:ChB2 X-Hashcash: 1:21:060327:andreas@gate450.dyndns.org::KwESyeEK4Jm2YBV6:8DGb In-Reply-To: <87veu1hz2u.fsf@gate450.dyndns.org> (Andreas Seltenreich's message of "Sun, 26 Mar 2006 19:53:45 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on yxa-iv X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on yxa.extundo.com X-Virus-Status: Clean X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62413 Archived-At: Andreas Seltenreich writes: > Hi, > > I just noticed that mail-add-payment (called from message-send-message) > doesn't recognise asynchronously generated payments for addresses that > contain uppercase characters. Attached is a patch that makes the test > case-insensitive. > > An alternative solution would be to supply the "-C" option to the > external hashcash program, but IMHO this would unnecessarily restrict > the user in his customisation needs (hashcash-extra-generate-parameters). > > Thanks, > andreas > > 2006-03-26 Andreas Seltenreich > > * hashcash.el (hashcash-already-paid-p): Bind case-fold-search > when searching for already-paid recipients. Applied, thanks! > Index: hashcash.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/hashcash.el,v > retrieving revision 7.14 > diff -c -r7.14 hashcash.el > *** hashcash.el 6 Jul 2005 06:42:01 -0000 7.14 > --- hashcash.el 26 Mar 2006 16:49:17 -0000 > *************** > *** 210,216 **** > (save-excursion > (save-restriction > (message-narrow-to-headers-or-head) > ! (let ((token (message-fetch-field "x-hashcash"))) > (and (stringp token) > (string-match (regexp-quote recipient) token)))))) > > --- 210,217 ---- > (save-excursion > (save-restriction > (message-narrow-to-headers-or-head) > ! (let ((token (message-fetch-field "x-hashcash")) > ! (case-fold-search t)) > (and (stringp token) > (string-match (regexp-quote recipient) token)))))) >