[CLOSED] XSS encoding

  1. #1

    [CLOSED] XSS encoding

    When I set the title for a panel to be
    <script>alert('hi');</script>
    the title doesn't show up but I dont get an alert either. This makes me think Ext.NET or ExtJS is doing some encoding for XSS. Is that correct? And is that something added recently?
    Last edited by Daniil; Jan 19, 2015 at 2:19 PM. Reason: [CLOSED]
  2. #2
    Hi @jchau,

    A Title is being applied to a title span's innerHTML as a string. I think it is something similar comparable to this:
    var div = document.createElement("div");
    
    div.innerHTML = "<script>alert('hi');</script>";
    document.body.appendChild(div);
    There is no an alert box in this raw HTML code as well. Also the content is not visible.

    As for XSS encoding in Ext.NET. We don't think there is any specific functionality like that built in Ext.NET.

    Also a raw ExtJS sample behaves in the same way.
    new Ext.Panel({
      renderTo: Ext.getBody(),
      title: "<script>alert('test')</script>"
    });
  3. #3
    Script in script tags in dynamic html will not be executed automatically. It is desired browser behaviour
    http://stackoverflow.com/questions/1...iv-doesnt-work
  4. #4
    Thank you! We had a security firm do XSS testing on our application almost 6 months ago back when we were still on Ext.NET 2.2. They found a few issues, but I am no longer able to reproduce once we upgraded to Ext.NET 2.5. So I assumed you guys did some changes for XSS.
  5. #5
    Maybe, we did something, but didn't realize it is against XSS:)

Similar Threads

  1. [CLOSED] PropertyGrid encoding and default value
    By tansu in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 21, 2011, 8:02 AM
  2. Content Encoding Error v1.0
    By king1231986 in forum 1.x Help
    Replies: 2
    Last Post: Jan 22, 2011, 3:18 AM
  3. Encoding Problem
    By cerebrum in forum 1.x Help
    Replies: 3
    Last Post: Nov 26, 2010, 6:52 PM
  4. [CLOSED] htmleditor encoding problem
    By alexp in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: May 07, 2009, 9:05 AM
  5. Replies: 0
    Last Post: Apr 28, 2009, 1:59 PM

Posting Permissions