跳到正文
Hacker News (official RSS)(github.com)·· 5 天前品質評分50

jQuery 4.1.0 更新,修正選擇器漏洞並改善多項功能

jQuery 4.1.0

重點導讀

jQuery 4.1.0 修正了選擇器比對中的 ReDoS 漏洞,也調整程式碼,避免讀取陣列時超出範圍。

  • 這次更新還讓 Ajax 回應多了 responseURL 欄位,並改善 XML 檔案、表單元件和選擇器的處理方式。
  • 使用 jQuery 的開發者可透過這次更新取得這些修正與改進。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

正文

· 1 commit to main since this release

Immutable release. Only release title and notes can be modified.

Ajax

  • Add the responseURL field to jqXHR (#4339, 5691e03a)
  • Support an alternative completeCallback API for transports (a05c3d73)

Core

  • Refactor loops to avoid going behind array bounds (5f8ed054)
  • Drop getElementsBy{Tag,Class}Name in favor of querySelectorAll (#3642, 53a2bcf9)

CSS

  • Empty the computeTableStyleTests probe table when it might be reused (#5932, f37226f0)
  • Use createElementNS to support XML documents (#4730, dcb31ae8)

Data

Docs

  • Add a new commercial support vendor: TuxCare (b75c1fef)
  • Fix spelling of XMLHttpRequest in README (#5903) (71c0dd14)
  • Add guidelines for machine-generated contributions (51eb576c)
  • Update the jQuery NES HeroDevs link in README (#5853) (dd7b28f4)
  • Update active version table (fef45254)
  • update README with 4.0 release (#5781, 5bffcc1a)

Selector

  • Work around a Safari 27 regex interepreter bug (b557a8c4)
  • Fix the runescape regex in unescapeSelector (e77f87c8)
  • Decode invalid escape code points to U+FFFD (#5845) (7e1efd77)
  • Optimize jQuery.uniqueSort duplicate removal (35789e76)
  • Be more strict in quick selection paths (a104324d)
  • Fix ReDoS in identifier matching (d41cf7dd)
  • Use loose document comparisons everywhere (74439453)

Serialize

Tests

  • Expect reliableTrDimensions to fail in Chrome (feaa9fcd)
  • Make the "jQuery.parseXML - error reporting" test less strict (5ed303d0)
  • Accept old & new :enabled/:disabled option/optgroup semantics (99f32901)
  • Add tests for jQuery.text (3818952f)
  • Add unit tests for callback-only animation signatures (#1738, ac837496)
  • Re-enable the AJAX binary data tests in IE (882be391)
  • Add jQuery.ajaxPrefilter & jQuery.ajaxTransport tests (0872b898)
  • Add tests for .data() on SVG elements (d1ff507a)
  • Increase test coverage of the serialize module (d97d76f1)

讀者討論

理性交流 · 即時討論