The toggle existed in the UI with no implementation behind it, so uploads were rejected regardless of the setting. New SvgUploads class: - Allowlists the SVG mime type and fixes WP's real-mime sniff, which otherwise nulls out the file type for SVGs specifically even after the mime allowlist is updated. - Populates width/height metadata (parsed from the SVG's own viewBox/width/height) — without this, wp_get_missing_image_subsizes() throws undefined-array-key warnings that can corrupt the upload response's JSON on environments with warnings displayed inline. - Basic sanitization on upload (strips <script> tags, inline event handlers, javascript: URIs). Verified live via the REST media endpoint: clean upload with correct dimensions, and a malicious test SVG had its script/handlers stripped while staying valid markup. Co-Authored-By: Claude Sonnet 5 <[email protected]>
18 lines
290 B
JSON
18 lines
290 B
JSON
{
|
|
"name": "aurora-admin-app",
|
|
"version": "2.3.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build"
|
|
},
|
|
"dependencies": {
|
|
"vue": "^3.5.26"
|
|
},
|
|
"devDependencies": {
|
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
"vite": "^6.0.7"
|
|
}
|
|
}
|