++camerasetup / camerasettings curl POST removes password
Hi Ben,
I think I've found a bug in 5.2.4b14. It was also in b10 but I don't know if any previous versions had the same problem as I've only just recently tried this command.
I'm using the following curl command to enable/disable a camera:
# Disable
curl -d 'cameraNum=2&camEnabledCheck=0&action=save' 'http://test:pass@192.168.1.10:8000/camerasettings'
# Enable
curl -d 'cameraNum=2&camEnabledCheck=1&action=save' 'http://test:pass@192.168.1.10:8000/camerasettings'
If I disable and then enable a camera, the password for that camera is removed. The same happens if I use ++camerasetup.
Also, should I be able to use auth with a POST? The following doesn't work for me:
curl -d 'auth=dGVzdDpwYXNz&cameraNum=8&camEnabledCheck=0&action=save' 'http://192.168.1.10:8000/camerasettings'
Thanks,
Paul.
I think I've found a bug in 5.2.4b14. It was also in b10 but I don't know if any previous versions had the same problem as I've only just recently tried this command.
I'm using the following curl command to enable/disable a camera:
# Disable
curl -d 'cameraNum=2&camEnabledCheck=0&action=save' 'http://test:pass@192.168.1.10:8000/camerasettings'
# Enable
curl -d 'cameraNum=2&camEnabledCheck=1&action=save' 'http://test:pass@192.168.1.10:8000/camerasettings'
If I disable and then enable a camera, the password for that camera is removed. The same happens if I use ++camerasetup.
Also, should I be able to use auth with a POST? The following doesn't work for me:
curl -d 'auth=dGVzdDpwYXNz&cameraNum=8&camEnabledCheck=0&action=save' 'http://192.168.1.10:8000/camerasettings'
Thanks,
Paul.
Comments
-
Hi Paul,
Thanks for reporting this, it does sound like a bug in the beta versions, we'll get this fixed.
Yes, you should be able to use the auth parameter, but it must go in the request, not the POST data, like this:
curl -d 'cameraNum=8&camEnabledCheck=0&action=save' 'http://192.168.1.10:8000/camerasettings?auth=dGVzdDpwYXNz' -
Thanks Ben!
-
-
Hi Ben, I can confirm this now works. Thank you very much!
-
Great to hear that, and thanks for letting us know about this issue.
