Summary: | kgpg uses wrong keyid to import key from keyserver | ||
---|---|---|---|
Product: | [Applications] kgpg | Reporter: | Axel Straschil <axel> |
Component: | general | Assignee: | bj |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Axel Straschil
2007-01-08 15:27:59 UTC
I did some research on this bug, and it is particularly noticable when using the keyserver "onak" (the output in the original bug looks to be from onak). onak returns the entire key fingerprint as the key ID, rather than the last 8 characters like other keyservers. Kgpg appears to assume that the ID will only be 8 characters long, and ends up using the _first_ 8 chars of the fingerprint rather than the last 8 as it should. It's not clear to me if onak should or should not be returning the whole fingerprint as the key ID, but I think it would be easy for kgpg to handle it either way. Considering that onak is one of the very few actively maintained free keyservers may magnify the importance of this issue. My versions: kgpg 1.2.x (several) KDE 3.5.x (several) Debian/Gentoo Thanks in advance -Mike Culbertson SVN commit 700719 by dakon: Fix wrong import key ids if key server returns complete fingerprint BUG:139774 While at it: use the last 16 bytes of the fingerprint to receive the key. This should ease the problem with duplicate key ids a bit. CCBUG:117799 M +5 -5 keyservers.cpp --- trunk/KDE/kdeutils/kgpg/keyservers.cpp #700718:700719 @@ -535,7 +535,7 @@ return; QString kid; - QString keysToSearch; + QStringList keysToSearch; m_listpop->kLEID->clear(); QList<Q3ListViewItem*>searchList = m_listpop->kLVsearch->selectedItems(); @@ -549,13 +549,13 @@ kid = searchList.at(i)->text(0).simplified(); kid = kid.section("key", 1, 1); - kid = kid.simplified(); - keysToSearch.append(' ' + kid.left(8)); + kid = kid.simplified().section(",", 0, 0); + keysToSearch << kid.right(16); } } - kDebug(2100) << keysToSearch ; - m_listpop->kLEID->setText(keysToSearch.simplified()); + kDebug(2100) << keysToSearch; + m_listpop->kLEID->setText(keysToSearch.join(" ")); } void KeyServer::slotPreImport() SVN commit 830494 by dakon: CCBUG:139774 Fix this also for 3.5 M +2 -3 keyservers.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=830494 |