Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion SLASHED-for-WP/includes/class-manual-css-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ public function handle_save() {
if ( 'clear' === $action ) {
update_option( self::OPTION_KEY, '' );
} else {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- CSS cannot be sanitized via wp_kses without corrupting valid rules (e.g. `>`, `[attr~="val"]`). The value is validated below and stored raw; output is escaped at render time.
// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- CSS cannot be sanitized via wp_kses without corrupting valid rules (e.g. `>`, `[attr~="val"]`). The value is validated below against injection patterns and stored raw; output is escaped at render time.
$raw_css = isset( $_POST['slashed_manual_css'] )
? wp_unslash( $_POST['slashed_manual_css'] )
: '';
// phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
// CSS must not be able to break out of an inline <style> context.
// Only block </style and <script; do NOT use wp_strip_all_tags() because
// it removes everything between < and >, corrupting valid CSS like
Expand Down
2 changes: 2 additions & 0 deletions scripts/zip-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const PLUGIN_ROOT = 'SLASHED-for-WP';
// src is the repo path; dest is the path inside the slashed/ zip folder.
const INCLUDE = [
{ src: `${PLUGIN_ROOT}/slashed.php`, dest: 'slashed.php' },
{ src: `${PLUGIN_ROOT}/readme.txt`, dest: 'readme.txt', required: true },
{ src: `${PLUGIN_ROOT}/license.txt`, dest: 'license.txt', required: true },
{ src: `${PLUGIN_ROOT}/includes`, dest: 'includes' },
{ src: `${PLUGIN_ROOT}/assets/admin-app`, dest: 'assets/admin-app', required: true },
{ src: `${PLUGIN_ROOT}/dist`, dest: 'dist', required: true },
Expand Down