GpgKeys: Remove redundant validity check of the ID string
The same check is performed in parseFingerprint. Change-Id: I87d085ab6fb56b76742368c4cabacc465634ccc3 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -91,11 +91,6 @@ public class GpgKeys implements ChildCollection<AccountResource, GpgKey> {
|
||||
public GpgKey parse(AccountResource parent, IdString id)
|
||||
throws ResourceNotFoundException, PGPException, OrmException, IOException {
|
||||
checkVisible(self, parent);
|
||||
String str = CharMatcher.whitespace().removeFrom(id.get()).toUpperCase();
|
||||
if ((str.length() != 8 && str.length() != 40)
|
||||
|| !CharMatcher.anyOf("0123456789ABCDEF").matchesAllOf(str)) {
|
||||
throw new ResourceNotFoundException(id);
|
||||
}
|
||||
|
||||
byte[] fp = parseFingerprint(id.get(), getGpgExtIds(parent));
|
||||
try (PublicKeyStore store = storeProvider.get()) {
|
||||
|
Reference in New Issue
Block a user