librouteros-api icon indicating copy to clipboard operation
librouteros-api copied to clipboard

No protocol check, freeze if invalid port number provided

Open wilsonlmh opened this issue 10 years ago • 0 comments

I found a big issue that the API freeze if I provided a wrong port number(but the port can reach some other service, e.g. HTTP or API-ssl). I don't good at that programming skills, but I did a trace so maybe you can figure out faster.

ros_login() -> line#809 ros_send_command_wait() -> line#795 ros_read_packet(conn) -> line#491 readLen(conn) -> line#125 _read()

The program freeze here (line#125). I tried HTTP and API-ssl both act same. Since I'm doing a command line tools. It's easy for ppl to type a incorrect port number(like 8278, 8729 etc.). I think it may have a check. Thanks!

wilsonlmh avatar Oct 27 '14 18:10 wilsonlmh