Gnus development mailing list
 help / color / mirror / Atom feed
* hashcash: duplicate payments
@ 2006-03-26 17:53 Andreas Seltenreich
  2006-03-26 20:01 ` Andreas Seltenreich
  2006-03-27  9:40 ` Simon Josefsson
  0 siblings, 2 replies; 6+ messages in thread
From: Andreas Seltenreich @ 2006-03-26 17:53 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

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  <uwi7@rz.uni-karlsruhe.de>

	* hashcash.el (hashcash-already-paid-p): Bind case-fold-search
	when searching for already-paid recipients.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: hashcash.el.patch --]
[-- Type: text/x-patch, Size: 824 bytes --]

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))))))
  

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-29  7:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-26 17:53 hashcash: duplicate payments Andreas Seltenreich
2006-03-26 20:01 ` Andreas Seltenreich
2006-03-27  9:43   ` Simon Josefsson
2006-03-29  4:16     ` Andreas Seltenreich
2006-03-29  7:49       ` Simon Josefsson
2006-03-27  9:40 ` Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).