Repository navigation
Conversation
Security scanners flag the bundled jQuery 3.3.1 (LinkStackOrg#995). Replace assets/js/jquery.min.js with the official 3.7.1 build: https://code.jquery.com/jquery-3.7.1.min.js sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo= Pages loading this file (linkstack, edit-link, url-validation) use no APIs removed or changed between 3.3.1 and 3.7.1. Other bundled copies (1.x, 3.4.1, slim, libs.min.js, PolySleek) are left for a separate change.
|
Ii think we may want to confirm we use/update every instance of jQuery to the latest version |
Address LinkStackOrg#995 across standalone copies using unmodified code.jquery.com full and slim distributions. Files before -> after: - assets/external-dependencies/jquery-3.4.1.min.js -> jquery-3.7.1.min.js (full 3.4.1 -> 3.7.1). - assets/external-dependencies/jquery.slim.min.js: slim 3.5.1 -> 3.7.1. - assets/linkstack/js/jquery.min.js: full 3.6.0 -> 3.7.1. - themes/PolySleek/extra/custom-assets/jquery.min.js: full 3.6.0 -> 3.7.1. - resources/views/components/config/config.blade.php:498, resources/views/installer/installer.blade.php:244 and resources/views/linkstack/modules/block-libraries.blade.php:23: jquery-3.4.1.min.js -> jquery-3.7.1.min.js. - resources/views/vendor/env-editor/layout.blade.php:25: replace slim 3.5.1 SRI with the slim 3.7.1 SHA-384. - resources/views/panel/config-editor.blade.php:189: jquery-1.11.1.min.js -> jquery-3.7.1.min.js; retain the 1.11.1 file. SHA-256 (base64): Full: /JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo= Slim: kmHvs0B+OpCW5GVHUNjv9rOmY0IvSIRcf7zGUDTDQM8= Slim SHA-384: 5AkRS45j4ukf+JbWAfHL8P4onPA9p0KwwP7pUdjSQA3ss9edbJUJc/XcYAiheSSz Compatibility audit (paths under resources/views unless noted): - components/config/config.blade.php:501-508 uses ready/on/scrollTop; installer/installer.blade.php:247-258 uses change/val/hide/show. - linkstack/modules/block-libraries.blade.php:23 only loads the library; linkstack/modules/admin-bar.blade.php:15-21 uses ready/click/toggle. User-authored custom HTML cannot be audited from repository sources. - vendor/env-editor/index.blade.php:68-70 uses append/Bootstrap alert; :91 uses fetch; components/_itemModal.blade.php:107,132 uses modal. No Ajax/effect dependency on slim, removed APIs or self-closing non-void HTML tags found in the audited page scripts/includes. - themes/PolySleek/extra/custom-body-end.blade.php:38,41,44 uses event shorthands; :53 uses animate; :147 uses $.trim, all retained in 3.7.1. - panel/config-editor.blade.php:198-220 uses on/attr/tab/scroll/animate; assets/external-dependencies/bootstrap.min.js:2 identifies v3.2.0; :6 has no jQuery upper-version restriction or removed API calls. Its modal .load takes a URL, not an event handler. Switch this page to full 3.7.1 without application changes; browser checks remain. Keep assets/js/jquery.min.js at 3.7.1. Leave assets/js/core/libs.min.js (3.6.1 combined bundle) for a rebuild; do not splice vendor code. Keep button-editor 1.7 ($.browser/.size dependencies), external 1.12.4 (iframe .load(handler)), unused button-editor/jquery.js and 1.11.1. Checks: official-byte/SHA-256 comparisons, slim SRI, node --check, protected-file byte comparisons with parent and origin/main, git diff --check, and no git grep matches for jquery-3.4.1.
|
Thanks! I pushed a follow-up commit that updates every standalone jQuery 3.x copy to the official 3.7.1 build (unmodified, SHA-256 matches the published SRI):
I left these alone on purpose, because upgrading them would break existing code or needs a rebuild:
Happy to do the 1.x pages (switch Testing: each updated file loaded in jsdom (version, events, DOM and attribute ops, AI disclosure: prepared, reviewed and tested with AI assistance (Claude and Codex), like the first commit. |
Closes #995
Replaces the bundled
assets/js/jquery.min.js(jQuery 3.3.1, flagged by security scanners) with the official jQuery 3.7.1 build from https://code.jquery.com/jquery-3.7.1.min.js, unmodified. Its SHA-256 matches the published SRI hash:sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=.Scope: one file. The pages that load it (
linkstack,studio/edit-link,url-validation) don't use any API that was removed or changed between 3.3.1 and 3.7.1. Checked: self-closing tag HTML (3.5htmlPrefilterchange),.size(),$.trim,.bind/.delegate,$.isArray.Testing: loaded the new file in jsdom and checked the version string,
ready,click/trigger,addClass,val,attr,css,each,find, and that$.ajaxexists. All passed.Not changed (possible follow-ups): other bundled jQuery copies are still old and may also be flagged:
assets/external-dependencies/jquery-1.11.1.min.js,jquery-1.12.4.min.js,jquery-3.4.1.min.js,jquery.slim.min.js(3.5.1)assets/button-editor/js/jquery-1.7.jsassets/linkstack/js/jquery.min.js(3.6.0)assets/js/core/libs.min.js(bundles 3.6.1)themes/PolySleek/extra/custom-assets/jquery.min.js(3.6.0)AI disclosure: this change was prepared, reviewed and tested with AI assistance (Claude and Codex).