Skip to content

Conversation

@freibergergarcia
Copy link
Contributor

Expected Behavior

Only scripts and assets that are concatable should be allowed to be overridden by the css_do_concat and js_do_concat filters.

Actual Behavior

Both filters don't take into consideration whether a script/asset is concatable. One example is:
https://github.com/Automattic/nginx-http-concat/blob/master/jsconcat.php#L100-L103

Where you could attempt to concat an external script.

Steps to Reproduce

The simplest way to reproduce is adding:

add_filter( 'js_do_concat', '__return_true' );
// or
add_filter( 'css_do_concat', '__return_true' );

Before overriding $do_concat, verify if scripts and styles are actually concatable.
@rinatkhaziev rinatkhaziev merged commit 8af207b into master Mar 31, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants