[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: keys are sometimes not removed from pgg's password cache

From: Richard Stallman
Subject: address@hidden: keys are sometimes not removed from pgg's password cache]
Date: Mon, 17 Jul 2006 12:06:59 -0400

Would someone please fix this and ack?

------- Start of forwarded message -------
To: address@hidden
From: address@hidden (Andreas =?iso-8859-1?Q?V=F6gele?=)
Date: Sat, 15 Jul 2006 21:31:39 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Cc: address@hidden
Subject: keys are sometimes not removed from pgg's password cache
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 

Keys, e.g. email addresses, that are longer than 16 characters will
not be properly removed from pgg's password cache.

You can verify this problem by evaluating the following expressions:

(require 'pgg)
(setq pgg-cache-passphrase t
      pgg-passphrase-cache-expiry 4)
(pgg-add-passphrase-to-cache "xxxxxxxx123456789" "foo")
; -> [0 \123456789 0 0 0 0 0]

If you check pgg-pending-timers repeatedly you'll see that the timer
won't be removed and that the password can still be retrieved from the
cache after 4 seconds:

(pgg-read-passphrase-from-cache "xxxxxxxx123456789")
; -> "foo"

The key can be deleted manually though:

(pgg-remove-passphrase-from-cache "xxxxxxxx123456789")

According to pgg.el "keys are truncated to 8 trailing characters
unless NOTRUNCATE is true".  But actually the macro
pgp-truncate-key-identifier in pgg-def.el doesn't truncate keys.
Instead the first eight characters are removed from the key:

(pgg-truncate-key-identifier "xxxxxxxx123456789")
; -> "123456789"

The macro is defined as follows:

(defmacro pgg-truncate-key-identifier (key)
  `(if (> (length ,key) 8) (substring ,key 8) ,key))

I think the second argument to substring should be -8 instead
of 8:

(defmacro pgg-truncate-key-identifier (key)
  `(if (> (length ,key) 8) (substring ,key -8) ,key))

I don't know why keys mustn't be longer than 8 characters.  But the
fix above solved my problem.

Kind regards,

In GNU Emacs (i386-unknown-openbsd3.9, X toolkit)
 of 2006-07-09 on hermes.voegele.dyndns.org
X server distributor `The X.Org Foundation', version 11.0.60900000
configured using `configure '--localstatedir=/var' '--without-gif' 
'--prefix=/usr/local' '--sysconfdir=/etc' 'CC=cc' 'CFLAGS=-O2 -pipe' 

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  desktop-save-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<up> <up> C-x C-e <down> <down> $ <right> C-x C-e <down> 
<down> <down> <down> <down> <down> <down> $ <right> 
C-x C-e <down> C-x C-e C-x C-e M-x r e p <tab> o <tab> 
r t <tab> <return>

Recent messages:
Loading dired...done
Desktop: 7 buffers restored.
For information about the GNU Project and its goals, type C-h C-p.
[nil 17593 14785 292644 nil pgg-remove-passphrase-from-cache ("123456789" nil) 
[0 \123456789 0 0 0 0 0]
[0 \123456789 0 0 0 0 0]
Making completion list... [2 times]
Loading emacsbug...done

emacs-pretest-bug mailing list
------- End of forwarded message -------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]