++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
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'
This should now be fixed in the new 5.2.4b15 beta version of SecuritySpy.
Can you confirm?