ZoneMinder / zmNinja

High performance, cross platform ionic app for Home/Commerical Security Surveillance using ZoneMinder
http://zmninja.zoneminder.com
Other
1.02k stars 271 forks source link

protocol bug - cgi-bin discover #231

Closed aljabr closed 8 years ago

aljabr commented 8 years ago

if i didn't but the http:// before the URL i get undefined://undefined/cgi-bin-zm

pliablepixels commented 8 years ago

can you tell me the exact steps you did to replicate this issue? If you added your portal url, admin id and password, hit save and tapped on cgi-bin discover it should have automatically added the protocol and if you did not, it should have told you you are not logged in. So I am curious what exact steps led to this.

aljabr commented 8 years ago

the issue only show if i didn't put the protocol the protocol only will added automatically when i try to save it i think the issue it should add the protocol automatically when i hit discover it's not that big issue but i think most of people forgets to add the protocol or get lazy :)

pliablepixels commented 8 years ago

Right, so I actually have a safeguard for that: https://github.com/pliablepixels/zmNinja/blob/master/www/js/LoginCtrl.js#L266-L276

If you are using this feature to set up zmNinja, those lines will detect that you are not logged in and will prompt you to Save first (as its only possible to detect after you log into the portal)

I think what happened in your case is, you were already logged in using previous credentials, then you went to Login Settings and changed the URL to test - and did not put a protocol, which resulted in this situation. Is that correct ? If so, I'll fix that scenario. If not, please let me know