There was an error while loading. Please reload this page.
1 parent 7f12576 commit b10548eCopy full SHA for b10548e
1 file changed
open-agent-auth-spring-boot-starter/src/main/resources/templates/admin/dashboard.html
@@ -349,10 +349,26 @@ <h2>No Capabilities Available</h2>
349
}
350
});
351
352
+ function isSafeFrameUrl(rawUrl) {
353
+ if (!rawUrl || typeof rawUrl !== 'string') {
354
+ return false;
355
+ }
356
+ var url = rawUrl.trim();
357
+ if (url === '') {
358
359
360
+ try {
361
+ var parsed = new URL(url, window.location.origin);
362
+ return parsed.protocol === 'http:' || parsed.protocol === 'https:';
363
+ } catch (e) {
364
365
366
367
+
368
function navigateTo(element) {
369
var url = element.getAttribute('data-url');
370
var frame = document.getElementById('contentFrame');
- if (frame) {
371
+ if (frame && isSafeFrameUrl(url)) {
372
frame.src = url;
373
374
0 commit comments