Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-4433

Socket parameters are not validated

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 5.9.1, 5.10.0
    • Transport
    • None
    • Patch Available

    Description

      Connect parameters are validated in every transport factory with a statement like this:

      if (!options.isEmpty()) {
        throw new IllegalArgumentException("Invalid connect parameters: " + options);
      }
      

      Socket parameters (i.e. connect parameters prefixed with socket.) are however never validated.

      They are put away at

      TcpTransportFactory.compositeConfigure(Transport, WireFormat, Map) line: 85	
      

      and then set at

      TcpTransport.initialiseSocket(Socket) line: 428
      

      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.

      Attachments

        1. 0001-Validate-socket-parameters.patch
          1 kB
          Christoffer Sawicki
        2. 0002-Validate-connector-parameters.patch
          2 kB
          Christoffer Sawicki
        3. 0003-Validate-transport-parameters.patch
          1 kB
          Christoffer Sawicki

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              qerub Christoffer Sawicki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: