mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-05 08:04:09 +01:00
* [FIX] Fixed JS bug with https and inverse proxy.
This commit is contained in:
2
js/app-actions.min.js
vendored
2
js/app-actions.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
var $jscomp={scope:{},findInternal:function(c,d,h){c instanceof String&&(c=String(c));for(var e=c.length,g=0;g<e;g++){var n=c[g];if(d.call(h,n,g,c))return{i:g,v:n}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,h){if(h.get||h.set)throw new TypeError("ES3 does not support getters and setters.");c!=Array.prototype&&c!=Object.prototype&&(c[d]=h.value)};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,h,e){if(d){h=$jscomp.global;c=c.split(".");for(e=0;e<c.length-1;e++){var g=c[e];g in h||(h[g]={});h=h[g]}c=c[c.length-1];e=h[c];d=d(e);d!=e&&null!=d&&$jscomp.defineProperty(h,c,{configurable:!0,writable:!0,value:d})}};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,h,e){if(d){h=$jscomp.global;c=c.split(".");for(e=0;e<c.length-1;e++){var g=c[e];g in h||(h[g]={});h=h[g]}c=c[c.length-1];e=h[c];d=d(e);d!=e&&null!=d&&$jscomp.defineProperty(h,c,{configurable:!0,writable:!0,value:d})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,h){return $jscomp.findInternal(this,c,h).v}},"es6-impl","es3");
|
||||
sysPass.Actions=function(c){var d=c.log,h=0,e={doAction:"/ajax/ajax_getContent.php",updateItems:"/ajax/ajax_getItems.php",user:{savePreferences:"/ajax/ajax_userPrefsSave.php",password:"/ajax/ajax_usrpass.php",passreset:"/ajax/ajax_passReset.php"},main:{login:"/ajax/ajax_doLogin.php",install:"/ajax/ajax_install.php",getUpdates:"/ajax/ajax_checkUpds.php"},checks:"/ajax/ajax_checkConnection.php",config:{save:"/ajax/ajax_configSave.php","export":"/ajax/ajax_configSave.php","import":"/ajax/ajax_configSave.php"},
|
||||
file:"/ajax/ajax_filesMgmt.php",link:"/ajax/ajax_itemSave.php",plugin:"/ajax/ajax_itemSave.php",account:{save:"/ajax/ajax_itemSave.php",showPass:"/ajax/ajax_accViewPass.php",saveFavorite:"/ajax/ajax_itemSave.php",request:"/ajax/ajax_itemSave.php",getFiles:"/ajax/ajax_accGetFiles.php",search:"/ajax/ajax_accSearch.php"},appMgmt:{show:"/ajax/ajax_itemShow.php",save:"/ajax/ajax_itemSave.php",search:"/ajax/ajax_itemSearch.php"},eventlog:"/ajax/ajax_eventlog.php",wiki:{show:"/ajax/ajax_wiki.php"},notice:{show:"/ajax/ajax_noticeShow.php",
|
||||
|
||||
@@ -113,7 +113,7 @@ sysPass.Requests = function (Common) {
|
||||
var getActionCall = function (opts, callbackOk, callbackError) {
|
||||
log.info("getActionCall");
|
||||
|
||||
var url = !opts.url.startsWith("http", 0) ? Common.config().APP_ROOT + opts.url : opts.url;
|
||||
var url = (!opts.url.startsWith("http", 0) && !opts.url.startsWith("https", 0)) ? Common.config().APP_ROOT + opts.url : opts.url;
|
||||
|
||||
var $ajax = $.ajax({
|
||||
dataType: opts.type,
|
||||
|
||||
6
js/app-requests.min.js
vendored
6
js/app-requests.min.js
vendored
@@ -1,7 +1,7 @@
|
||||
var $jscomp={scope:{},checkStringArgs:function(b,c,a){if(null==b)throw new TypeError("The 'this' value for String.prototype."+a+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+a+" must not be a regular expression");return b+""}};
|
||||
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[c]=a.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[c]=a.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b};$jscomp.global=$jscomp.getGlobal(this);
|
||||
$jscomp.polyfill=function(b,c,a,d){if(c){a=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var e=b[d];e in a||(a[e]={});a=a[e]}b=b[b.length-1];d=a[b];c=c(d);c!=d&&null!=c&&$jscomp.defineProperty(a,b,{configurable:!0,writable:!0,value:c})}};
|
||||
$jscomp.polyfill("String.prototype.startsWith",function(b){return b?b:function(b,a){var c=$jscomp.checkStringArgs(this,b,"startsWith");b+="";for(var e=c.length,f=b.length,g=Math.max(0,Math.min(a|0,c.length)),h=0;h<f&&g<e;)if(c[g++]!=b[h++])return!1;return h>=f}},"es6-impl","es3");
|
||||
sysPass.Requests=function(b){var c=b.log,a=[],d={get:function(){return a},add:function(b){var e=""===b.hash?SparkMD5.hash(JSON.stringify(b),!1):b.hash;if(0<a.length&&a[a.length-1].hash===e)return a;c.info("history:add");b.hash=e;a.push(b);15<=a.length&&a.splice(0,10);return a},del:function(){c.info("history:del");if("undefined"!==typeof a.pop())return a[a.length-1]},reset:function(){c.info("history:reset");a=[]},length:function(){return a.length}};return{getRequestOpts:function(){return Object.create({type:"json",
|
||||
url:"",method:"post",callback:"",async:!0,data:"",cache:!1,processData:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",timeout:0,addHistory:!1,hash:"",useLoading:!0})},getActionCall:function(a,f,g){c.info("getActionCall");var e=a.url.startsWith("http",0)?a.url:b.config().APP_ROOT+a.url;return $.ajax({dataType:a.type,url:e,method:a.method,async:a.async,data:a.data,cache:a.cache,processData:a.processData,contentType:a.contentType,timeout:a.timeout,beforeSend:function(){!0===a.useLoading&&
|
||||
b.appTheme().loading.show()},success:function(b){if("function"!==typeof f)return!0;!0===a.addHistory&&(a.callback=f,d.add(a));f(b)},error:function(d,e,f){"function"!==typeof g?(d=b.config().LANG[1]+"<p>"+f+e+"</p>",c.error(d),"html"===a.type&&$("#content").html(b.msg.html.error(f)),b.msg.error(d)):g()},complete:function(){!0===a.useLoading&&b.appTheme().loading.hide();b.appTheme().ajax.complete()}})},history:d}};
|
||||
url:"",method:"post",callback:"",async:!0,data:"",cache:!1,processData:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",timeout:0,addHistory:!1,hash:"",useLoading:!0})},getActionCall:function(a,f,g){c.info("getActionCall");var e=a.url.startsWith("http",0)||a.url.startsWith("https",0)?a.url:b.config().APP_ROOT+a.url;return $.ajax({dataType:a.type,url:e,method:a.method,async:a.async,data:a.data,cache:a.cache,processData:a.processData,contentType:a.contentType,timeout:a.timeout,beforeSend:function(){!0===
|
||||
a.useLoading&&b.appTheme().loading.show()},success:function(b){if("function"!==typeof f)return!0;!0===a.addHistory&&(a.callback=f,d.add(a));f(b)},error:function(d,e,f){"function"!==typeof g?(d=b.config().LANG[1]+"<p>"+f+e+"</p>",c.error(d),"html"===a.type&&$("#content").html(b.msg.html.error(f)),b.msg.error(d)):g()},complete:function(){!0===a.useLoading&&b.appTheme().loading.hide();b.appTheme().ajax.complete()}})},history:d}};
|
||||
|
||||
Reference in New Issue
Block a user