feat: add BlogBodySanitizer for HTML sanitization on article save
- Implemented BlogBodySanitizer to clean HTML content before saving articles, ensuring security against XSS attacks. - Added tests for BlogBodySanitizer to verify that unsafe tags and attributes are stripped from the content. - Introduced ApiLeastPrivilegeTest to ensure that unauthorized users cannot access sensitive API routes, maintaining strict access control.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { screen, fireEvent, render } from '@testing-library/react';
|
||||
import { MemoryRouter, Route, Routes, Link } from 'react-router-dom';
|
||||
import { MemoryRouter, Route, Routes, Link } from 'react-router';
|
||||
import BackButton from './BackButton';
|
||||
import PageHeader from './PageHeader';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user