Race condition in AbstractIoFilterChain
---------------------------------------
Key: DIRMINA-123
URL: http://issues.apache.org/jira/browse/DIRMINA-123
Project: Directory MINA
Type: Bug
Versions: 0.9
Reporter: Vinod Panicker
Assigned to: Trustin Lee
There is a race condition that occurs due to filter handling in
AbstractIoFilterChain. The bug manifested itself when using the client side of
the SSLFilter impl. In the register method below -
private void register( Entry prevEntry, String name, IoFilter filter )
throws Exception
{
Entry newEntry = new Entry( prevEntry, prevEntry.nextEntry, name,
filter );
filter.init( this, newEntry.nextFilter );
prevEntry.nextEntry.prevEntry = newEntry;
prevEntry.nextEntry = newEntry;
name2entry.put( name, newEntry );
filter2entry.put( filter, newEntry );
}
filter.init causes the ssl client HELLO to be sent to the server. If the
client and server are on a fast network, the server response comes before the
filter has been "put", causing it to be handed to the IoHandler.
Solution is to init the filter after putting it on the session.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira