From ebe04f8fc791413131c37425998be5be4a2ef538 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 28 Sep 2018 14:29:43 -0400 Subject: #709 dont escape urls in caller, incorporate cordova http ssl and basic auth checks --- www/js/LoginCtrl.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'www/js/LoginCtrl.js') diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index d7548258..fc63ff06 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -582,6 +582,27 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r if ($rootScope.platformOS != 'desktop') { + if ($scope.loginData.isUseBasicAuth) { + debug ("Cordova HTTP: configuring basic auth"); + cordova.plugin.http.useBasicAuth($scope.loginData.basicAuthUser, $scope.loginData.basicAuthPassword); + } + + if (!$scope.loginData.enableStrictSSL) { + + //alert("Enabling insecure SSL"); + log(">>>> Disabling strict SSL checking (turn off in Dev Options if you can't connect)"); + cordova.plugin.http.setSSLCertMode('nocheck', function() { + debug('--> SSL is permissive, will allow any certs. Use at your own risk.'); + }, function() { + console.log('-->Error setting SSL permissive'); + }); + + } else { + + log(">>>> Enabling strict SSL checking (turn off in Dev Options if you can't connect)"); + + } + if ($scope.loginData.saveToCloud) { NVRDataModel.debug ("writing data to cloud"); -- cgit v1.2.3