Do not display unverified uids as part of a key for hkp index and vindex output

This is not for security or privacy reasons, but to provide an accurate answer to a search request.
dont-leak-uids
Simon Vareille 2020-06-14 18:03:24 +02:00
parent eaefa45ddb
commit 5c1ddb4e21
No known key found for this signature in database
GPG Key ID: 008AE8E706CC19F9
1 changed files with 3 additions and 1 deletions

View File

@ -136,7 +136,9 @@ class HKP {
ctx.body = `info:${VERSION}:${COUNT}\npub:${fp}:${algo}:${key.keySize}:${created}::\n`;
for (const uid of key.userIds) {
ctx.body += `uid:${encodeURIComponent(`${uid.name} <${uid.email}>`)}:::\n`;
if(uid.verified) {
ctx.body += `uid:${encodeURIComponent(`${uid.name} <${uid.email}>`)}:::\n`;
}
}
}
}