Custom Query (7259 matches)


Show under each result:

Results (13 - 15 of 7259)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ticket Resolution Summary Owner Reporter
#15284 fixed XSS Vulnerability on text options of jQuery UI datepicker andycyork

similar to but applies to the datepicker

to recreate

Create a new HTML page.

Inject this content into new page:

<!DOCTYPE html>
<html xmlns="">
  <title>XSS in  options of datepicker</title>

  <script src=""></script>
  <script src=""></script>
  <link rel="stylesheet" type="text/css" href="">
		$(document).ready(function () {
			$( "#datepicker" ).datepicker({
				showButtonPanel: true,
				showOn: "both",
				closeText: '<script>alert("closeText XSS")<\/script>', 
				currentText: '<script>alert("currentText XSS")<\/script>',
				prevText: '<script>alert("prevText XSS")<\/script>',	
				nextText: '<script>alert("nextText XSS")<\/script>',
				buttonText: '<script>alert("buttonText XSS")<\/script>',
				appendText: '<script>alert("appendText XSS")<\/script>'
	<p>Date: <input type="text" id="datepicker"></p>

on load, alerts are shown for appendText & buttonText
after clicking the input control, alerts are shown for closeText, currentText, prevText & nextText

The scripted alerts should not be shown - an attacker can take advantage of injecting malicious XSS content into website.

#15279 wontfix Support for private fields and methods within widgets Jake Meiergerd

I've been working lately on a framework of common jQuery widgets, built through the Widget Factory, for use in a larger application, and I've got a lot of widget inheritance going on. I've found myself wishing for a way to have a particular widget define private members that can't accidentally be overridden by another widget, because that implementer didn't realize he defined a field or method with the same name as an existing one on the base widget. In other words, I need a solution for namespace conflicts.

I've got one that works by adding some additional new functions to $.Widget.prototype, and using a custom wrapper functions for $.widget(), but it's rather cumbersome to use, as it requires widgets to call these additional functions at the beginning of almost every regular function call.

I took a shot at integrating the "tacked-on" code into the widget component itself, and it's a lot nicer to use. I'm ready to submit a pull request with the code, if there's interest.

Conceptually, the solution is as follows:

First, each widget prototype can define a field named "_privates", in the same fashion as the "options" field. When prototypes are merged, however, any "_privates" fields are not simply merged together, but are re-organized into an object structure of the following form:

_privates: {
    Namespace1: {
        Widget1: {},
        Widget2: {}
    Namespace2: {
        Widget1: {},
        Widget2: {}

Second, the proxy methods that define "_super" and "_superApply" for every method call on the widget instance now also define a "_myPrivates" field, which extracts the appropriate sub-object from the "_privates" object, based on the namespace and name of the prototype that is being proxied.

Finally, when a new instance of the widget is created, the "_privates" object on the merged prototype is cloned anew for the new instance, similar to the "options" object.

I also added the step of searching for any functions in the cloned "_privates" object and binding them to the widget instance, so they can access other fields and methods of the widget. Requiring the widget to do this manually seems like pointless boilerplate, but I'm open to discussion.

Ultimately, you get a system that looks like this:

#15278 notabug stop jQuery UI dialogue box scroll top when close ryannz

I have this problem that when I close jQuery UI dialog, the window keeps scrolling to top but I just want my window to stay in the same position. Please have a look at this clip

After going through the close function in the library, I notice this is the part of the code that trigger the scrolling (please correct me if I am wrong).

if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {

        // Hiding a focused element doesn't trigger blur in WebKit
        // so in case we have nothing to focus on, explicitly blur the active element
        $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );

Is there a way I can fix that without modifying the library? thanks.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note: See TracQuery for help on using queries.