Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e39c8ce
update notifications components designs
christian-byrne Oct 26, 2025
7430772
fix stylelint issues
christian-byrne Oct 26, 2025
593edd5
fix test locator
christian-byrne Oct 26, 2025
a24643a
update release notification components with semantic design tokens
christian-byrne Oct 29, 2025
40ba53d
fix notification component tests and remove temporary mock data
christian-byrne Nov 6, 2025
f155a18
implement new designs
christian-byrne Nov 7, 2025
87d434c
fix test
christian-byrne Nov 7, 2025
e7c9cdf
update style
christian-byrne Nov 13, 2025
e563ca5
use correct tokens
christian-byrne Nov 13, 2025
4b3ccd9
remove border radius token
christian-byrne Nov 14, 2025
c370386
[feat] Implement proper design tokens and Storybook stories for relea…
christian-byrne Nov 27, 2025
5c514eb
add i18n
christian-byrne Nov 27, 2025
1faf41b
[fix] Fix notification component tests and improve empty content hand…
christian-byrne Nov 30, 2025
57bf2ae
[security] Fix XSS vulnerability in notification components
christian-byrne Nov 30, 2025
6f3abc7
[fix] Address nitpick comments
christian-byrne Dec 4, 2025
062b1a7
Remove merge marker
DrJKL Dec 4, 2025
b1ab138
fix: remove inappropriate update button from WhatsNewPopup and add sc…
christian-byrne Dec 6, 2025
468335c
refactor: remove inappropriate image stories from toast component
christian-byrne Dec 9, 2025
ee89a3a
[fix] resolve merge conflict markers in main.json
christian-byrne Dec 9, 2025
a7d949a
[fix] remove TypeScript any casts and improve type safety in tests
christian-byrne Dec 9, 2025
892d785
[fix] correct HTML rel attribute, use semantic CSS token, prevent tes…
christian-byrne Dec 9, 2025
0724df8
[fix] use i18n for hardcoded strings, fix Storybook vitest mock, clea…
christian-byrne Dec 9, 2025
b83b4e5
[fix] add recentRelease mock to Storybook for proper component rendering
christian-byrne Dec 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[security] Fix XSS vulnerability in notification components
Add DOMPurify sanitization to HTML content rendered via v-html in both:
- ReleaseNotificationToast.vue: Sanitize all HTML output including fallback content
- WhatsNewPopup.vue: Sanitize fallback and error HTML content

Markdown content is already sanitized by renderMarkdownToHtml utility.
  • Loading branch information
christian-byrne committed Dec 9, 2025
commit 57bf2ae26f80442c14f86067fa74e022e0890ccd
12 changes: 7 additions & 5 deletions src/platform/updates/components/WhatsNewPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
</template>

<script setup lang="ts">
import { default as DOMPurify } from 'dompurify'
import Button from 'primevue/button'
import { computed, onMounted, ref } from 'vue'

Expand Down Expand Up @@ -95,7 +96,7 @@ const changelogUrl = computed(() => {

const formattedContent = computed(() => {
if (!latestRelease.value?.content) {
return `<p>No release notes available.</p>`
return DOMPurify.sanitize(`<p>No release notes available.</p>`)
}

try {
Expand All @@ -104,7 +105,7 @@ const formattedContent = computed(() => {
// Check if content is meaningful (not just whitespace)
const trimmedContent = markdown.trim()
if (!trimmedContent || trimmedContent.replace(/\s+/g, '') === '') {
return `<p>No release notes available.</p>`
return DOMPurify.sanitize(`<p>No release notes available.</p>`)
}

// Extract image and remaining content separately
Expand All @@ -119,14 +120,15 @@ const formattedContent = computed(() => {
.filter(Boolean)
.join('\n\n')

// renderMarkdownToHtml already sanitizes with DOMPurify, so this is safe
return renderMarkdownToHtml(reorderedContent)
} catch (error) {
console.error('Error parsing markdown:', error)
// Fallback to plain text with line breaks
// Fallback to plain text with line breaks - sanitize the HTML we create
const fallbackContent = latestRelease.value.content.replace(/\n/g, '<br>')
return fallbackContent.trim()
? fallbackContent
: `<p>No release notes available.</p>`
? DOMPurify.sanitize(fallbackContent)
: DOMPurify.sanitize(`<p>No release notes available.</p>`)
}
})

Expand Down