arcoirislabs / cordova-plugin-mqtt

MqTT Cordova Plugin for Apache Cordova (> v3.0)
MIT License
86 stars 49 forks source link

Arguments checking #18

Closed 4refr0nt closed 8 years ago

4refr0nt commented 8 years ago

Please, add range checking to JS part for preventing app crashes.

java.lang.IllegalArgumentException: Invalid topic length, should be in range[1, 65535]!
    at org.eclipse.paho.client.mqttv3.MqttTopic.validate(MqttTopic.java:158)
    at org.eclipse.paho.client.mqttv3.MqttAsyncClient.subscribe(MqttAsyncClient.java:823)
    at org.eclipse.paho.client.mqttv3.MqttAsyncClient.subscribe(MqttAsyncClient.java:783)
    at com.arcoirislabs.plugin.mqtt.CordovaMqTTPlugin.subscribe(CordovaMqTTPlugin.java:273)
    at com.arcoirislabs.plugin.mqtt.CordovaMqTTPlugin.access$200(CordovaMqTTPlugin.java:24)
    at com.arcoirislabs.plugin.mqtt.CordovaMqTTPlugin$3.run(CordovaMqTTPlugin.java:76)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5264)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695)
arcoirislabs commented 8 years ago

Ok Victor. We shall push the update asap

Sent from my iPhone

On 24-Sep-2016, at 1:12 AM, Victor Brutskiy notifications@github.com wrote:

Please, add range checking to JS part for preventing app crashes.

java.lang.IllegalArgumentException: Invalid topic length, should be in range[1, 65535]! at org.eclipse.paho.client.mqttv3.MqttTopic.validate(MqttTopic.java:158) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.subscribe(MqttAsyncClient.java:823) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.subscribe(MqttAsyncClient.java:783) at com.arcoirislabs.plugin.mqtt.CordovaMqTTPlugin.subscribe(CordovaMqTTPlugin.java:273) at com.arcoirislabs.plugin.mqtt.CordovaMqTTPlugin.access$200(CordovaMqTTPlugin.java:24) at com.arcoirislabs.plugin.mqtt.CordovaMqTTPlugin$3.run(CordovaMqTTPlugin.java:76) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5264) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

arcoirislabs commented 8 years ago

This issue is addressed