Motion-Project / motionplus

MotionPlus Home Page: https://motion-project.github.io/
GNU General Public License v3.0
319 stars 40 forks source link

Motionplus dies when non-valid cam id is used in a curl post statement #85

Closed gabbymouth closed 1 year ago

gabbymouth commented 1 year ago

Did you read the guide?

Yes

What is the base version number of MotionPlus being used?

0.1.x

What was the install method?

Built from source code

What is base architecture?

x86/x64

What is the distro being used?

Ubuntu

Disto version number

20.04

Camera/Sound type(s) being used?

Network camera with HTTP

Describe the issue/problem and steps to reproduce

Example command used. Cam ID 244 not defined, loaded and running.

curl -X POST http://localhost:8080 -d "camid=244&command=config&threshold=150"

Relevant MotionPlus log output (at log_level 8)

[DBG][STR][00:wc00] webu_parseurl: Sent url: /
[DBG][STR][00:wc00] webu_parseurl: Decoded url: /
[DBG][STR][00:wc00] webu_parms_edit: camid: >< thread: >-1< cmd1: >< cmd2: >< cmd3: ><
[DBG][ALL][00:wc00] webu_hostname: Full Host:  //localhost:8080
[INF][ALL][00:wc00] webu_client_connect: Connection from: 127.0.0.1
[DBG][ALL][00:wc00] webu_hostname: Full Host:  //localhost:8080
[DBG][ALL][00:wc00] webu_hostname: Above message repeats 1 times
[DBG][STR][00:wc00] webu_answer_post: processing post
[DBG][STR][00:wc00] webu_post_cmdthrd: key: camid  value: 244
[DBG][STR][00:wc00] webu_post_cmdthrd: key: command  value: config
[DBG][STR][00:wc00] webu_post_cmdthrd: key: threshold  value: 150

At this point motionplus dies.