libproxy crashes with pac

Bug #776618 reported by Pekka Pessi
This bug report is a duplicate of:  Bug #739286: libproxy crashes with pac. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libproxy (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04
 $ dpkg-query -W libproxy0
libproxy0 0.3.1-2ubuntu5

Steps to reproduce problems:
- use a proxy.pac calling isInNet, shExpMatch or isPlainHostName functions
- use something relying on libproxy to do proxy.pac parsing, e.g., clock applet with weather

Wait until application calls px_proxy_factory_get_proxies() twice => crash

Seems to me that the problem is in pacutils.js with bad isInNet, shExpMatch or isPlainHostName functions.

Tags: patch
Revision history for this message
Pekka Pessi (ppessi) wrote :

Fix regexps usage in pacutils.js for webkit

Revision history for this message
Pekka Pessi (ppessi) wrote :

Clear dangling references to webkit pac context and prevent future crash if there is a problem evaluating the pac file.

Revision history for this message
Pekka Pessi (ppessi) wrote :

Hmph. Better patch for pacutils.js, now with working isInNet().

Revision history for this message
Pekka Pessi (ppessi) wrote :

...and 3rd one, now without extra call to dnsResolve().

Revision history for this message
DimStar (dominique-launchpad-net) wrote :

Just a side note regarding pacutils.js:
This is a copy / extract of the firefox sources. If you're convinced they are wrong, better report them to Mozilla :)

(the isInNet is indeed changed there too, the other two functions seem unchanged.

(See http://hg.mozilla.org/mozilla-central/file/7528b2718827/netwerk/base/src/nsProxyAutoConfig.js )

tags: added: patch
Revision history for this message
Pekka Pessi (ppessi) wrote :

Looks like the backslashes in pacutils.js were already doublequoted, no wonder they did not work when fed as is to webkit. isInNet seems to be the only function not working properly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.