1 Reply Latest reply on Aug 11, 2012 7:18 PM by Michael Thornburgh

    How to limit the size of the connection method parameter

    kahsbnxasxwasx Level 1

      I connected an FMS server like var nc = new NetConnection ();
                                                        nc.connect ("rtmfp :/ / localhost: 61018/zy/1", a);
      But how to restrict the size of the parameter a, assuming that this a set to a 10GB object, or a very large byte, I found that the server received. This allows the hacker attacks, Is there any way to limit the size of this a, I hope that does not exceed 100KB.

        • 1. Re: How to limit the size of the connection method parameter
          Michael Thornburgh Adobe Employee

          RTMFP encodes low-level messages in a manner compatible with RTMP messages. RTMP messages are length-field limited to 16MB (24 bits), and there is an artificial software limit somewhat less than that (approximately 10MB if i recall correctly).

           

          it should not be possible to send a connect message to an RTMFP or RTMP server exceeding about 10MB.

           

          ByteArray is limited to 4GB, and can't be serialized to AMF beyond 512MB (29 bits).

           

          also keep in mind that for an RTMFP or RTMP server to receive such a large message, that many bytes must be sent to it from somewhere (you).