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,9 @@
|
||||
# define your env variables for the test env here
|
||||
KERNEL_CLASS='App\Kernel'
|
||||
APP_SECRET='$ecretf0rt3st'
|
||||
# مقدارِ ثابت و آشکارا غیرعملیاتی: محیط تست هیچوقت به داده یا کاربر واقعی وصل
|
||||
# نمیشود، و همین شفافیت جلوی این را میگیرد که کسی این فایل را منبع یک secret
|
||||
# واقعی بپندارد. secret واقعی فقط در `.env.local` و خارج از git است.
|
||||
APP_SECRET='not-a-secret-test-env-only'
|
||||
|
||||
# Test DB: doctrine's when@test config appends the `_test` suffix (see
|
||||
# config/packages/doctrine.yaml), so this base name `db` becomes `db_test`.
|
||||
|
||||
Reference in New Issue
Block a user