diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-28 14:29:43 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-28 14:29:43 -0400 |
| commit | ebe04f8fc791413131c37425998be5be4a2ef538 (patch) | |
| tree | a8f6e6a15c9e3125f20e9081c59755911a8253bb /www/js/LoginCtrl.js | |
| parent | d8fea09d65e5207ef8c4fafcddd5fc74a7f7be00 (diff) | |
#709 dont escape urls in caller, incorporate cordova http ssl and basic auth checks
Diffstat (limited to 'www/js/LoginCtrl.js')
| -rw-r--r-- | www/js/LoginCtrl.js | 21 |
1 files changed, 21 insertions, 0 deletions
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"); |
