motion_conf="$conf_path/motion.conf"
if [ -r "$motion_conf" ]; then
username=$(cat $motion_conf | grep 'admin_username' | cut -d ' ' -f 3)
- password=$(cat $motion_conf | grep 'admin_password' | cut -d ' ' -f 3 | sed -r 's/[^][a-zA-Z0-9\/?_.=&{}":, _]/-/g')
+ password=$(cat $motion_conf | grep 'admin_password' | cut -d ' ' -f 3 | sed -r 's/[^][a-zA-Z0-9/?_.=&{}":, _]/-/g')
+ echo "aa${password}aa" > /tmp/wtf
fi
fi
fi
makeTimeValidator($('input[type=text].time'));
/* custom validators */
+ makeCustomValidator($('#adminPasswordEntry'), function (value) {
+ if (!value.toLowerCase().match(new RegExp('^[\x21-\x7F]*$'))) {
+ return "special characters are not allowed in admin password";
+ }
+
+ return true;
+ }, '');
makeCustomValidator($('#deviceNameEntry'), function (value) {
if (!value) {
return 'this field is required';