mirror of
https://github.com/corda/corda.git
synced 2025-06-15 05:38:14 +00:00
* ENT-1564 - add additional uploader check to the HashConstraint (#2845)
(cherry picked from commit 1a1cd94
)
* ENT-1564 changelog entry
* ENT-1564 ignored tests that were removed in master
This commit is contained in:
committed by
Katelyn Baker
parent
190232d1f2
commit
de40d1dae5
@ -3,7 +3,7 @@ package net.corda.nodeapi.internal
|
||||
import net.corda.core.contracts.Attachment
|
||||
import net.corda.core.contracts.ContractAttachment
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.internal.DEPLOYED_CORDAPP_UPLOADER
|
||||
import net.corda.core.internal.isUploaderTrusted
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
import java.io.ByteArrayInputStream
|
||||
import java.io.ByteArrayOutputStream
|
||||
@ -33,7 +33,7 @@ class AttachmentsClassLoader(attachments: List<Attachment>, parent: ClassLoader
|
||||
}
|
||||
|
||||
init {
|
||||
require(attachments.mapNotNull { it as? ContractAttachment }.none { it.uploader != DEPLOYED_CORDAPP_UPLOADER }) {
|
||||
require(attachments.mapNotNull { it as? ContractAttachment }.all { isUploaderTrusted(it.uploader) }) {
|
||||
"Attempting to load Contract Attachments downloaded from the network"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user