Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

πŸ”’ Fixes XSS in workspace url param (GHSA-58mp-4qr3-vmrc)

Alicia Sykes4bc620e21cc8
diff --git a/src/views/Workspace.vue b/src/views/Workspace.vue
index 919e2f6e..17aa58e1 100644
--- a/src/views/Workspace.vue
+++ b/src/views/Workspace.vue
@@ -20,6 +20,7 @@ import WidgetView from '@/components/Workspace/WidgetView';
import MultiTaskingWebComtent from '@/components/Workspace/MultiTaskingWebComtent';
import Defaults from '@/utils/config/defaults';
import ErrorHandler from '@/utils/logging/ErrorHandler';
+import { sanitizeUrl } from '@/utils/Sanitizer';
export default {
name: 'Workspace',
@@ -80,7 +81,7 @@ export default {
getInitialUrl() {
const route = this.$route;
if (route.query && route.query.url) {
- return decodeURI(route.query.url);
+ return sanitizeUrl(decodeURI(route.query.url)) || undefined;
} else if (this.appConfig.workspaceLandingUrl) {
return this.appConfig.workspaceLandingUrl;
}