mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
js: Only load URLs prefixed by the base URL
(cherry picked from commit aad020511f12ad5c2dfd9859a52b1c8618be198d)
This commit is contained in:
parent
8600f4fe31
commit
6ddf61981c
@ -221,6 +221,10 @@
|
||||
loadUrl: function (url, $target, data, method, action, autorefresh, progressTimer, extraHeaders) {
|
||||
var id = null;
|
||||
|
||||
if (url.startsWith('//') || ! url.startsWith(this.baseUrl + '/')) {
|
||||
throw new Error('URL ' + url + ' is not relative to ' + this.baseUrl);
|
||||
}
|
||||
|
||||
// Default method is GET
|
||||
if ('undefined' === typeof method) {
|
||||
method = 'GET';
|
||||
|
Loading…
x
Reference in New Issue
Block a user