mirror of
https://github.com/corda/corda.git
synced 2024-12-20 05:28:21 +00:00
Fix a bug in the AMQP protocol wrapper code which gives incorrect reply address information on received packets. (#2914)
This commit is contained in:
parent
7ec65901b6
commit
0af42bda44
@ -359,9 +359,9 @@ internal class ConnectionStateMachine(serverMode: Boolean,
|
||||
payload,
|
||||
link.source.address,
|
||||
remoteLegalName,
|
||||
NetworkHostAndPort(localAddress.hostString, localAddress.port),
|
||||
localLegalName,
|
||||
NetworkHostAndPort(remoteAddress.hostString, remoteAddress.port),
|
||||
localLegalName,
|
||||
NetworkHostAndPort(localAddress.hostString, localAddress.port),
|
||||
appProperties,
|
||||
channel,
|
||||
delivery)
|
||||
|
@ -122,10 +122,10 @@ internal class AMQPChannelHandler(private val serverMode: Boolean,
|
||||
is SendableMessageImpl -> {
|
||||
val inetAddress = InetSocketAddress(msg.destinationLink.host, msg.destinationLink.port)
|
||||
require(inetAddress == remoteAddress) {
|
||||
"Message for incorrect endpoint"
|
||||
"Message for incorrect endpoint $inetAddress expected $remoteAddress"
|
||||
}
|
||||
require(CordaX500Name.parse(msg.destinationLegalName) == CordaX500Name.build(remoteCert!!.subjectX500Principal)) {
|
||||
"Message for incorrect legal identity"
|
||||
"Message for incorrect legal identity ${msg.destinationLegalName} expected ${remoteCert!!.subjectX500Principal}"
|
||||
}
|
||||
log.debug { "channel write ${msg.applicationProperties["_AMQ_DUPL_ID"]}" }
|
||||
eventProcessor!!.transportWriteMessage(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user