Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 274641

Summary: app-crypt/pinentry-0.7.5 encodes "%"-character to "%25"
Product: Gentoo Linux Reporter: W. Elschner <gentoobugzilla_reply>
Component: Current packagesAssignee: Sven Wegener <swegener>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description W. Elschner 2009-06-18 20:37:13 UTC
On my ~amd64-system pinentry (compiled with USE flags gtk, ncurses, qt3) encodes "%"-character to "%25". This is really bad when a passphrase contains a "%"-character because gpg or openpgp (which use pinentry) get the wrong passphrase.

This happens when I just type "%" after "getpin":

$ pinentry
OK Your orders please
getpin
D %25
OK

The problem seems to be "%25" while gpg / openpgp expect "%". Same with pinentry-curses and pinentry-qt.Other special characters like !"ยง$&/()= are not encoded.

$ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=de_DE.UTF-8
Comment 1 W. Elschner 2009-06-18 20:37:52 UTC
emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30 x86_64)
=================================================================
System uname: Linux-2.6.30-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4000+-with-gentoo-2.0.1
Timestamp of tree: Thu, 18 Jun 2009 16:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 1.3.7-r1, 2.1.8-r1
dev-lang/python:     2.4.4-r6, 2.5.4-r2, 2.6.2-r1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     9999
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/alon-barlev /usr/portage/local/layman/xake-toolchain /usr/portage/local/layman/synce /usr/portage/local/layman/gimpel /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/java-overlay /usr/portage/local/layman/java-gcj-overlay /usr/portage/local/layman/sunrise /usr/portage/local/layman/jokey /usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 acl acpi alsa amd64 avahi berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr eds encode esd exif ffmpeg fortran gdbm glitz gnome gphoto2 gpm gstreamer gtk hal iconv imap ipv6 isdnlog jpeg libnotify lm_sensors midi mmx mmxext mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg openmp pam pcre pdf perl png policykit pppd python quicktime readline reflection samba session spell spl sse sse2 ssl svg sysfs tcpd threads tiff truetype truetype-fonts type1-fonts unicode vorbis xorg xulrunner xvid zlib" ALSA_CARDS="snd-hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Sven Wegener gentoo-dev 2009-07-04 17:32:44 UTC
That pinentry encodes % is required by the assuan protocol and its up to the application to decode the string. I just tried gpg and it works correct.