Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Base.js unescape reassignment and intrusion protection systems
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael  
View profile  
 More options Jul 16, 9:34 pm
From: Michael <mstras...@gmail.com>
Date: Thu, 16 Jul 2009 18:34:17 -0700 (PDT)
Local: Thurs, Jul 16 2009 9:34 pm
Subject: Base.js unescape reassignment and intrusion protection systems
I have found a problem with MochiKit Base.js and the intrusion
protection system at work. The IPS truncates Base.js because it
assigns the unescape() function to a variable (in parseQueryString(),
line 1225 in version 1.4.2 of Base.js). The IPS response is documented
here:

http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape...

Has anybody else seen this behaviour? Could the code be re-written to
not use that reassignment?

(I discovered this because MarkMail does not work, and it uses a
compressed version of MochiKit 1.4.)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Per Cederberg  
View profile  
 More options Jul 16, 11:18 pm
From: Per Cederberg <cederb...@gmail.com>
Date: Fri, 17 Jul 2009 05:18:35 +0200
Local: Thurs, Jul 16 2009 11:18 pm
Subject: Re: [mochikit] Base.js unescape reassignment and intrusion protection systems
The reassignment is for backwards compability if I understand it correctly:

        if (typeof(decodeURIComponent) != "undefined") {
            decode = decodeURIComponent;
        } else {
            decode = unescape;
        }

From the JavaScript 1.5 guide at Mozilla:

The escape and unescape functions do not work properly for non-ASCII
characters and have been deprecated. In JavaScript 1.5 and later, use
encodeURI, decodeURI, encodeURIComponent, and decodeURIComponent.

https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Predefined...

I don't see any good alternative solutions here. Perhaps the IDS
should be forced to allow a few exceptions?

Cheers,

/Per


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Ippolito  
View profile  
 More options Jul 16, 11:19 pm
From: Bob Ippolito <b...@redivi.com>
Date: Thu, 16 Jul 2009 20:19:26 -0700
Local: Thurs, Jul 16 2009 11:19 pm
Subject: Re: [mochikit] Base.js unescape reassignment and intrusion protection systems
There are various ways it could be rewritten, but without knowing
exactly how stupid the IPS is it's hard to say which permutation would
pass its test. Someone who can reproduce this issue should spend some
time with it and produce a patch.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Per Cederberg  
View profile  
 More options Jul 17, 2:07 am
From: Per Cederberg <cederb...@gmail.com>
Date: Fri, 17 Jul 2009 08:07:12 +0200
Local: Fri, Jul 17 2009 2:07 am
Subject: Re: [mochikit] Re: Base.js unescape reassignment and intrusion protection systems
Now that I'm awake, it strikes me that this might be the obvious solution:

   function decode(text) {
       if (typeof(decodeURIComponent) != "undefined") {
           return decodeURIComponent(text);
       } else {
           return unescape(text);
       }
   }

Try to patch it in a repackage the source code and let us know how it
works. It's slightly less efficient code, but we might optimize some
of that away if it works.

Cheers,

/Per


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael  
View profile  
 More options Jul 19, 9:59 pm
From: Michael <mstras...@gmail.com>
Date: Sun, 19 Jul 2009 18:59:27 -0700 (PDT)
Local: Sun, Jul 19 2009 9:59 pm
Subject: Re: Base.js unescape reassignment and intrusion protection systems
Thanks Per for your analysis. I think your suggestion will work. Who
will try it? I am not a MochiKit user directly. I'm a MarkMail user
who investigated why he can't view articles at work.

At work I am getting an exception made to allow JavaScript from
markmail.org. But that doesn't help anyone else wanting to use a site
using MochiKit inside a similarly-protected environment.

The IDS information I have is that a Proventia device scans JavaScript
files. It truncates any that contain a reassignment of the unescape()
function to a variable because that is considered a vulnerability. I
have tested at work with a minimal JavaScript file and found that
Per's suggested modification is not blocked.

—Michael

On Jul 17, 4:07 pm, Per Cederberg <cederb...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google