Fix XSS vulnerability in jQuery MLKeyboard#27
Conversation
The plugin was vulnerable to Cross-Site Scripting (XSS) when a malicious string was passed to the `selector` or `trigger` options. This happened because strings were passed directly to the jQuery `$()` constructor, which could result in element creation and execution of scripts if the string contained HTML. This change ensures that string inputs for `selector` and `trigger` are treated strictly as CSS selectors by using `$(document).find(selector)`. Affected files: - src/keyboard.js: Updated selection logic. - jquery.ml-keyboard.js: Rebuilt with the fix. - jquery.ml-keyboard.min.js: Rebuilt with the fix. Co-authored-by: mBut <6901397+mBut@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Fixed a security vulnerability that allowed XSS through the
selectorandtriggeroptions in the jQuery MLKeyboard plugin. I modifiedsrc/keyboard.jsto use safer jQuery selection logic and rebuilt the distribution files. Verified the fix by creating a reproduction case and confirming it no longer executes malicious scripts.PR created automatically by Jules for task 1602719455991304553 started by @mBut