[
https://issues.apache.org/jira/browse/DIRMINA-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Valliere closed DIRMINA-1126.
--------------------------------------
Merged into 2.1.X
> filterWrite in ProtocolCodecFilter can send corrupted writeRequest message to
> the next filter
> ---------------------------------------------------------------------------------------------
>
> Key: DIRMINA-1126
> URL: https://issues.apache.org/jira/browse/DIRMINA-1126
> Project: MINA
> Issue Type: Bug
> Components: Filter
> Affects Versions: 2.1.1
> Reporter: Amir Katz
> Assignee: Jonathan Valliere
> Priority: Major
> Fix For: 2.1.4
>
>
> We have promoted our codebase from 2.1.0 to 2.1.3 and some clients started
> reporting corrupted byte buffer since they weren't able to decode it.
> Bisecting the issue leads to a change introduced in 2.1.1
> [https://github.com/apache/mina/commit/2d08d530961597b9f21dff861725f08e73fb9291/#diff-84dd8cbe057e8d10a034715a2fa3074cL27]
> Bisecting the code lead to this code change:
>
> {code:java}
> if (!(encodedMessage instanceof IoBuffer) || ((IoBuffer)
> encodedMessage).hasRemaining()) {
> - SocketAddress destination = writeRequest.getDestination();
> - WriteRequest encodedWriteRequest = new EncodedWriteRequest(encodedMessage,
> null, destination);
> + writeRequest.setMessage(encodedMessage);
> - nextFilter.filterWrite(session, encodedWriteRequest);
> + nextFilter.filterWrite(session, writeRequest);
> }
>
> {code}
> Reverting this change in 2.1.3 showed this resolve the issue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]