Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.
/ soil Public archive

Strip '-wp' from WP jQuery version to fix #226#227

Closed
garretthyder wants to merge 2 commits intoroots:masterfrom
garretthyder:fix-jquery-cdn
Closed

Strip '-wp' from WP jQuery version to fix #226#227
garretthyder wants to merge 2 commits intoroots:masterfrom
garretthyder:fix-jquery-cdn

Conversation

@garretthyder
Copy link
Copy Markdown

Quick fix for #226 to use str_replace to strip the undesired '-wp' suffix.

Garrett Hyder added 2 commits May 22, 2019 10:48
Quick fix for #226 to use str_replace to strip the undesired '-wp' suffix.
@garretthyder
Copy link
Copy Markdown
Author

Just wanted to give a note. Although this PR resolves the issue might not be the best approach as it would utilize a vulnerable copy of jQuery.

From the Core Trac ticket some notes;

Comment from azaozz;

Ideally plugins that replace the local copy of jQuery will be updated to not replace it, and use the patched version distributed with WP.
Also this plugin https://wordpress.org/plugins/use-google-libraries/ (which is unfortunately outdated/seems unsupported) is "doing it right". See https://plugins.trac.wordpress.org/browser/use-google-libraries/tags/1.6.2.2/use-google-libraries.php#L354.

Follow-up Comment from azaozz;

The "proper" solution would be to stop loafing the unpatched jQuery from a CDN, and load the patched version from WP.
As @desrosj pointed out above, the version in core is more secure than the one available elsewhere. #47020 was a security hardening that backported a fix from jQuery 3.4.0.

@retlehs retlehs closed this in #228 May 23, 2019
@garretthyder garretthyder deleted the fix-jquery-cdn branch May 23, 2019 03:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant