activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-4433) Socket parameters are not validated
Date Thu, 31 Oct 2013 10:21:18 GMT

    [ https://issues.apache.org/jira/browse/AMQ-4433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13810091#comment-13810091
] 

Claus Ibsen commented on AMQ-4433:
----------------------------------

Had a deeper look into this. And it seems that various transport options and whatnot is lazy
configured later such as when failover protocol creates a new tcp connection and so forth.
So we need to back down on validating those options as we cannot know all options in use up
front. Though the socket validation ought to be okay.

> Socket parameters are not validated
> -----------------------------------
>
>                 Key: AMQ-4433
>                 URL: https://issues.apache.org/jira/browse/AMQ-4433
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Christoffer Sawicki
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 5.10.0
>
>         Attachments: 0001-Validate-socket-parameters.patch, 0002-Validate-connector-parameters.patch,
0003-Validate-transport-parameters.patch
>
>
> Connect parameters are validated in every transport factory with a statement like this:
> {noformat}
> if (!options.isEmpty()) {
>   throw new IllegalArgumentException("Invalid connect parameters: " + options);
> }
> {noformat}
> Socket parameters (i.e. connect parameters prefixed with {{socket.}}) are however never
validated.
> They are put away at
> {noformat}
> TcpTransportFactory.compositeConfigure(Transport, WireFormat, Map) line: 85	
> {noformat}
> and then set at
> {noformat}
> TcpTransport.initialiseSocket(Socket) line: 428
> {noformat}
> where there is no check that {{socketOptions}} is empty after the call.
> I've attached a patch (#1) that rectifies this.
> Bonus: I found similar issues in the transport classes. See patch #2 and #3.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message