Skip to content

Fix potentially vulnerable cloned function - #1645

Merged
jokob-sk merged 2 commits into
netalertx:next_releasefrom
npt-1707:fix_CVE-2016-10735
May 18, 2026
Merged

Fix potentially vulnerable cloned function#1645
jokob-sk merged 2 commits into
netalertx:next_releasefrom
npt-1707:fix_CVE-2016-10735

Conversation

@npt-1707

@npt-1707 npt-1707 commented May 17, 2026

Copy link
Copy Markdown
Contributor

Hi,

Our tool identified a potential vulnerability in clone functions in front/lib/datatables/datatables.js sourced from twbs/bootstrap. This issue, originally reported in CVE-2016-10735, was resolved in the repository via this commit twbs/bootstrap@d9be1da.

This PR suggests applying the corresponding patch to fix the vulnerabilities in this codebase.

Please review at your convenience. Thank you!

Summary by CodeRabbit

  • Refactor
    • Improved DOM element selection handling in data table components to enhance stability and reliability.

Review Change Stack

YoSafeguard and others added 2 commits May 15, 2026 12:20
Currently translated at 100.0% (809 of 809 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4db24d1f-46fd-4e9c-91dd-e81f7c0b55ec

📥 Commits

Reviewing files that changed from the base of the PR and between 198ca5d and 80c8a66.

📒 Files selected for processing (1)
  • front/lib/datatables/datatables.js

📝 Walkthrough

Walkthrough

This PR refactors jQuery DOM element selection patterns in front/lib/datatables/datatables.js. It replaces direct jQuery selection expressions with document-scoped lookups using $(document).find() across multiple Bootstrap event handlers, and normalizes how hash targets are derived from href and data-target attributes in carousel and modal click handlers.

Changes

Bootstrap/jQuery DOM Selection Refactor

Layer / File(s) Summary
Document-scoped jQuery selection updates across event handlers
front/lib/datatables/datatables.js
Parent element initialization (lines 10835–10836, 11512) now uses $(document).find(selector) instead of $(selector), with special handling for '#' selectors. Carousel click handler (lines 11232–11240) refactors target resolution by explicitly extracting href, stripping hash portions, then using $(document).find(target). Modal data-api click handler (lines 11971–11974) similarly splits target derivation from hash-stripping and uses document-scoped lookup. Return value (line 11430) changes from $(target) to $(document).find(target).

In the realm of selectors bright,
Where jQuery queries took their flight,
A bunny now ensures each find,
Searches through document's design—
Scoped and tidy, left and right! 🐰✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fix potentially vulnerable cloned function' is vague and doesn't clearly convey the specific security issue being addressed (XSS vulnerability in Bootstrap components). Consider using a more specific title like 'Fix XSS vulnerability in Bootstrap components (CVE-2016-10735)' or 'Fix DOM selector vulnerability in datatables.js' to better reflect the security nature and scope of the changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jokob-sk
jokob-sk changed the base branch from main to next_release May 18, 2026 02:14
@jokob-sk
jokob-sk merged commit 328e591 into netalertx:next_release May 18, 2026
1 check 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