web-manager 3.1.36 → 3.1.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +12 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -93,6 +93,11 @@ function Manager() {
93
93
  brand: {
94
94
  name: 'default'
95
95
  },
96
+ contact: {
97
+ emailSupport: '',
98
+ emailBusiness: '',
99
+ },
100
+ validRedirectHosts: [],
96
101
  // preferences: {
97
102
  // // firebase: {
98
103
  // // enabled: false
@@ -624,14 +629,10 @@ function Manager() {
624
629
  This.properties.global.url = configuration.global.url;
625
630
  This.properties.global.cacheBreaker = configuration.global.cacheBreaker;
626
631
  This.properties.global.brand.name = configuration.global.brand.name;
632
+ This.properties.global.contact.emailSupport = configuration.global.contact.emailSupport;
633
+ This.properties.global.contact.emailBusiness = configuration.global.contact.emailBusiness;
634
+ This.properties.global.validRedirectHosts = configuration.global.validRedirectHosts;
627
635
  This.properties.meta.environment = utilities.get(configuration, 'global.settings.debug.environment', This.properties.meta.environment);
628
-
629
- // This.properties.global.cacheBreaker = This.properties.meta.environment === 'development'
630
- // ? new Date().getTime()
631
- // : This.properties.global.cacheBreaker;
632
- // This.log('Config: ', options_user);
633
-
634
- // parse query stringify
635
636
  This.properties.page.queryString = new URLSearchParams(window.location.search);
636
637
  var pageQueryString = This.properties.page.queryString
637
638
  var pagePathname = window.location.pathname;
@@ -1643,10 +1644,14 @@ function Manager() {
1643
1644
  }
1644
1645
 
1645
1646
  Manager.prototype.isValidRedirectUrl = function (url) {
1647
+ var self = this;
1648
+
1646
1649
  var returnUrlObject = new URL(decodeURIComponent(url));
1647
1650
  var currentUrlObject = new URL(window.location.href);
1651
+
1648
1652
  return returnUrlObject.host === currentUrlObject.host
1649
1653
  || returnUrlObject.protocol === this.properties.global.app + ':'
1654
+ || self.properties.global.validRedirectHosts.includes(returnUrlObject.host)
1650
1655
  }
1651
1656
 
1652
1657
  // Manager.prototype.performance = function() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.1.36",
3
+ "version": "3.1.37",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {