jquery / jquery-ui

The official jQuery user interface library.
https://jqueryui.com
Other
11.26k stars 5.33k forks source link

Issue in jQuery-UI-1.13.1 - Fix done for ticket #8235 is removed #2116

Open haseenaog opened 2 years ago

haseenaog commented 2 years ago

Description

Missing fix for ticket #8235 in latest versions of jQuery-UI is creating issue when overlays are used in screen.

I used jQuery-UI-1.13.1 and jQuery-UI-1.13.2 in my project. When I open any overlay and select data and return to parent page, parent page gets rendered twice. This issue is getting resolved if I put back fix done for ticket #8235. So kindly let me know why was this fix removed. Let me know if it is handled differently and if I need to check that.

Link to test case

mgol commented 2 years ago

Thanks for the report. I transferred the issue to the correct repo as this is jQuery UI related.

Please paste a link to the correct issue as I don’t know which issue you are referring to.

haseenaog commented 2 years ago

Thank you for your response. Bug link is https://bugs.jquery.com/ticket/8235 .

Regards Haseena

On Tue, Sep 13, 2022, 12:13 PM Michał Gołębiowski-Owczarek < @.***> wrote:

Thanks for the report. I transferred the issue to the correct repo as this is jQuery UI related.

please paste a link to the correct issue as I don’t know which issue you are referring to.

— Reply to this email directly, view it on GitHub https://github.com/jquery/jquery-ui/issues/2116#issuecomment-1244969045, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BINCUXLZVBANGPWYRQLKDV6AO7LANCNFSM6AAAAAAQLDSUME . You are receiving this because you authored the thread.Message ID: @.***>

mgol commented 2 years ago

This is a jQuery issue, not jQuery UI. Also, it's been fixed long ago and the whole jQuery Data implementation has been rewritten from scratch since that time. I doubt this is related to anything.

If you have an issue to report, please submit a test case where the issue can be clearly visible. You can use a service like JS Bin for that.

Also, does the issue exist in jQuery 1.13.x or just 1.12.1?

haseenaog commented 2 years ago

Issue is in jQuery 1.13.1 and 1.13.2 versions.

Code in jQuery-UI-1.12.1: $.cleanData = ( function( orig ) { return function( elems ) { var events, elem, i; for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { try {

            // Only trigger remove when necessary to save time
            events = $._data( elem, "events" );
            if ( events && events.remove ) {
                $( elem ).triggerHandler( "remove" );
            }

        // Http://bugs.jquery.com/ticket/8235
        } catch ( e ) {}
    }
    orig( elems );
};

} )( $.cleanData );

Code in jQuery-UI-1.13.1 and jQuery-UI-1.13.2: $.cleanData = ( function( orig ) { return function( elems ) { var events, elem, i; for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {

        // Only trigger remove when necessary to save time
        events = $._data( elem, "events" );
        if ( events && events.remove ) {
            $( elem ).triggerHandler( "remove" );
        }
    }
    orig( elems );
};

} )( $.cleanData );

Missing try and catch blocks are causing issue when open and close overlays.

mgol commented 2 years ago

Thanks, but we still need a live test case as I mentioned.

pwkoscp123 commented 1 year ago

Hello friends, is it possible to use Jquery ui exploit code and 1.12.1 and 1.13.1 Let it be injected through the console and give an alert Thankful

pwkoscp123 commented 1 year ago

Thanks, but we still need a live test case as I mentioned.

Can you please answer, thank you

mgol commented 1 year ago

@pwkoscp123 I'm honestly not sure what you're talking about, this doesn't seem to be relevant in any way to this issue. Please keep the discussion on topic.

pwkoscp123 commented 1 year ago

how much do you pay?!