mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Fixing SignedNodeInfoe security issue (#2908)
This commit is contained in:
parent
623eae7da1
commit
2f1b8ff23e
@ -25,7 +25,7 @@ class SignedNodeInfo(val raw: SerializedBytes<NodeInfo>, val signatures: List<Di
|
||||
fun verified(): NodeInfo {
|
||||
val nodeInfo = raw.deserialize()
|
||||
val identities = nodeInfo.legalIdentities.filterNot { it.owningKey is CompositeKey }
|
||||
|
||||
require(identities.isNotEmpty()) { "At least one identity with a non-composite key needs to be specified." }
|
||||
if (identities.size < signatures.size) {
|
||||
throw SignatureException("Extra signatures. Found ${signatures.size} expected ${identities.size}")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user