]> source.dussan.org Git - gitea.git/commit
Handle duplicate keys on GPG key ring (#17242)
authorzeripath <art27@cantab.net>
Thu, 7 Oct 2021 20:10:14 +0000 (21:10 +0100)
committerGitHub <noreply@github.com>
Thu, 7 Oct 2021 20:10:14 +0000 (23:10 +0300)
commit46cac263ca9f350fbc414b795e42f79d4d241e28
tree1e9072fcf4750adf47566be59e44a64fbe07e1ed
parent29acb3213b39a47dfab3e3e91ebb12931eca48b9
Handle duplicate keys on GPG key ring (#17242)

It is possible that a keyring can contain duplicate keys on a keyring due to jpegs or
other layers. This currently leads to a confusing error for the user - where we report
a duplicate key insertion.

This PR simply coalesces keys into one key if there are duplicates.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
models/gpg_key_add.go