Skip to content

Commit

Permalink
Merge branch 'master' into PHRAS-3945-mv-config-pusher
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaillat authored Nov 17, 2023
2 parents 8dab256 + 148b17b commit 89c447f
Show file tree
Hide file tree
Showing 44 changed files with 1,220 additions and 477 deletions.
7 changes: 5 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,12 @@ GATEWAY_USERS=
GATEWAY_FASTCGI_HTTPS=off

# Content Security Policy (CSP)
# security that helps to detect and mitigate certain types of attacks, including Cross-Site Scripting
# helps to detect and mitigate some types of attacks, including Cross-Site Scripting (XSS).
# CSP default values are included in the "Gateway" container entrypoint.
# Use GATEWAY_CSP env var if you want to define yours and/or override Gateway CSP values.
# GATEWAY_CSP="default-src 'self' 127.0.0.1 https://sockjs-eu.pusher.com:443 wss://ws-eu.pusher.com https://apiws.carrick-skills.com:8443 https://apiws.carrick-flow.com:8443 https://fonts.gstatic.com *.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com *.axept.io *.matomo.cloud *.newrelic.com *.nr-data.net https://www.googletagmanager.com *.google-analytics.com *.phrasea.io https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com data: ; script-src 'unsafe-inline' 'unsafe-eval' 'self' https://www.gstatic.com *.alchemyasp.com *.axept.io *.matomo.cloud *.newrelic.com https://www.googletagmanager.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com data: blob: ; style-src 'self' 'unsafe-inline' https://fonts.gstatic.com https://fonts.googleapis.com https://www.google.com https://www.gstatic.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com ; img-src 'self' data: blob: *.tiles.mapbox.com https://axeptio.imgix.net *.cloudfront.net *.phrasea.io *.amazonaws.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 https://maxcdn.bootstrapcdn.com https://www.gnu.org/graphics/ ; object-src 'self'; frame-ancestors 'self'"
# @run
GATEWAY_CSP="default-src 'self' 127.0.0.1 https://sockjs-eu.pusher.com:443 wss://ws-eu.pusher.com https://apiws.carrick-skills.com:8443 https://apiws.carrick-flow.com:8443 https://fonts.gstatic.com *.tiles.mapbox.com https://api.mapbox.com https://events.mapbox.com *.axept.io *.matomo.cloud *.newrelic.com *.nr-data.net https://www.googletagmanager.com *.google-analytics.com *.phrasea.io https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 data: ;script-src 'unsafe-inline' 'unsafe-eval' 'self' https://www.gstatic.com *.alchemyasp.com *.axept.io *.matomo.cloud *.newrelic.com https://www.googletagmanager.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 ;style-src 'self' 'unsafe-inline' https://fonts.gstatic.com https://fonts.googleapis.com https://www.google.com https://www.gstatic.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443;img-src 'self' data: blob: *.tiles.mapbox.com https://axeptio.imgix.net *.cloudfront.net *.phrasea.io *.amazonaws.com https://apiws.carrick-flow.com:8443 https://apiws.carrick-skills.com:8443 ; object-src 'self';frame-ancestors 'self'"
GATEWAY_CSP=

# --- RabbitMQ settings ------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ module.exports = {
setupDir: _root + 'tests/setup/node.js',
karmaConf: _root + 'config/karma.conf.js',
// change this version when you change JS file for lazy loading
assetFileVersion: 97
assetFileVersion: 98
};
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=97";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=98";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/authenticate.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=97";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=98";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=97";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=98";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/commons.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=97";
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=98";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
Expand Down
5 changes: 5 additions & 0 deletions Phraseanet-production-client/dist/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,11 @@ var download = function download(services) {
success: function success(data) {
$dialog.setContent(data);
_onDownloadReady($dialog, window.exportConfig);
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});

Expand Down
5 changes: 5 additions & 0 deletions Phraseanet-production-client/dist/lightbox.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,11 @@ var download = function download(services) {
success: function success(data) {
$dialog.setContent(data);
_onDownloadReady($dialog, window.exportConfig);
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});

Expand Down
109 changes: 105 additions & 4 deletions Phraseanet-production-client/dist/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,6 @@ function setPref(name, value) {
},
dataType: 'json',
timeout: _jquery2.default.data[prefName] = false,
error: _jquery2.default.data[prefName] = false,
success: function success(data) {
if (data.success) {
humane.info(data.message);
Expand All @@ -1626,6 +1625,12 @@ function setPref(name, value) {
}
_jquery2.default.data[prefName] = false;
return data;
},
error: function error(data) {
_jquery2.default.data[prefName] = false;
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
return _jquery2.default.data[prefName];
Expand Down Expand Up @@ -3503,6 +3508,10 @@ var publication = function publication(services) {
_jquery2.default.post(url + 'prod/feeds/requestavailable/', options, function (data) {

return openModal(data);
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});

return;
Expand Down Expand Up @@ -4391,6 +4400,10 @@ var sharebasketModal = function sharebasketModal(services, datas) {
$dialog.setContent(data);
_onDialogReady();
return;
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});

return true;
Expand Down Expand Up @@ -5543,8 +5556,11 @@ var editRecord = function editRecord(services) {
(0, _jquery2.default)('#tooltip').hide();
return;
},
error: function error(XHR, textStatus, errorThrown) {
if (XHR.status === 0) {
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
if (data.status === 0) {
return false;
}
}
Expand Down Expand Up @@ -7487,6 +7503,11 @@ var exportRecord = function exportRecord(services) {
} else {
_onExportReady($dialog, window.exportConfig);
}
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});

Expand Down Expand Up @@ -7911,6 +7932,11 @@ var printRecord = function printRecord(services) {
success: function success(data) {
(0, _jquery2.default)('#DIALOG').removeClass('loading').empty().append(data);
return;
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
}
Expand Down Expand Up @@ -10464,6 +10490,11 @@ var workzone = function workzone(services) {
},
success: function success(data) {
return;
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
});
Expand Down Expand Up @@ -11100,6 +11131,11 @@ var workzone = function workzone(services) {
if ('error' in data) {
(0, _jquery2.default)('.publication-list').empty().html(data.error);
}
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});

Expand Down Expand Up @@ -17919,6 +17955,11 @@ var deleteBasket = function deleteBasket(services) {
}

return false;
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
};
Expand Down Expand Up @@ -19869,6 +19910,11 @@ var archiveBasket = function archiveBasket(services) {
alert(data.message);
}
return;
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
}
Expand Down Expand Up @@ -19944,6 +19990,10 @@ var basketCreate = function basketCreate(services) {
$dialog.setContent(data);
_onDialogReady();
return;
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});
};

Expand Down Expand Up @@ -20076,6 +20126,11 @@ var storyCreate = function storyCreate(services) {
_onDialogReady();

return;
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
};
Expand Down Expand Up @@ -20283,6 +20338,10 @@ var basketUpdate = function basketUpdate(services) {
$dialog.setContent(data);
_onDialogReady();
return;
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});
};

Expand Down Expand Up @@ -20706,7 +20765,12 @@ var basketReorderContent = function basketReorderContent(services) {
return _jquery2.default.get(url + 'prod/baskets/' + basketId + '/reorder/', function (data) {
$dialog.setContent(data);
_onDialogReady();

return;
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});
};

Expand Down Expand Up @@ -20984,7 +21048,12 @@ var storyReorderContent = function storyReorderContent(services) {
return _jquery2.default.get(url + 'prod/story/' + dbId + '/' + recordId + '/reorder/', function (data) {
$dialog.setContent(data);
_onDialogReady();

return;
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});
};

Expand Down Expand Up @@ -22086,7 +22155,12 @@ var moveRecord = function moveRecord(services) {
return _jquery2.default.ajax({
type: 'POST',
url: url + 'prod/records/movecollection/',
data: datas
data: datas,
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
};

Expand Down Expand Up @@ -62266,6 +62340,11 @@ var deleteRecord = function deleteRecord(services) {
//reset top position of dialog
$dialog.getDomElement().offsetParent().css('top', ((0, _jquery2.default)(window).height() - $dialog.getDomElement()[0].clientHeight) / 2);
_onDialogReady();
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});

Expand Down Expand Up @@ -62469,6 +62548,11 @@ var propertyRecord = function propertyRecord(services) {
success: function success(data) {
$dialog.setContent(data);
_onPropertyReady($dialog);
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});

Expand Down Expand Up @@ -62627,6 +62711,10 @@ var pushbasketModal = function pushbasketModal(services, datas) {
$dialog.setContent(data);
_onDialogReady();
return;
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});

return true;
Expand Down Expand Up @@ -62686,6 +62774,10 @@ var recordPublishModal = function recordPublishModal(services, datas) {
_jquery2.default.post(url + 'prod/feeds/requestavailable/', datas, function (data) {

return (0, _publication2.default)(services).openModal(data);
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});

return true;
Expand Down Expand Up @@ -62761,6 +62853,10 @@ var recordToolsModal = function recordToolsModal(services, datas) {
$dialog.setOption('contextArgs', datas);
_onModalReady(data, window.toolsConfig, activeTab);
return;
}).fail(function (data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
});
};

Expand Down Expand Up @@ -65169,6 +65265,11 @@ var preferences = function preferences(services) {
(0, _jquery2.default)('body').removeClass().addClass('PNB ' + color);
/* console.log('saved:' + color);*/
return;
},
error: function error(data) {
if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) {
self.location.replace(self.location.href); // refresh will redirect to login
}
}
});
});
Expand Down
Loading

0 comments on commit 89c447f

Please sign in to comment.