Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: net/proxy/proxy_resolver_script.h

Issue 40006: Fix error being thrown in isInNet() PAC js (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: use exec() and add a test for bad ip address Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/data/proxy_resolver_v8_unittest/pac_library_unittest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_script.h
===================================================================
--- net/proxy/proxy_resolver_script.h (revision 10781)
+++ net/proxy/proxy_resolver_script.h (working copy)
@@ -49,6 +49,7 @@
// sed -e 's/^\s*$/""/g' |
// sed -e 's/"\s*[+]\s*$/"/g' |
// sed -e 's/"$/" \\/g' |
+// sed -e 's/\/(ipaddr);/\/.exec(ipaddr);/g' |
// grep -v '^var pacUtils ='
#define PROXY_RESOLVER_SCRIPT \
"function dnsDomainIs(host, domain) {\n" \
@@ -70,7 +71,7 @@
"}\n" \
"" \
"function isInNet(ipaddr, pattern, maskstr) {\n" \
- " var test = /^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/(ipaddr);\n" \
+ " var test = /^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/.exec(ipaddr);\n" \
" if (test == null) {\n" \
" ipaddr = dnsResolve(ipaddr);\n" \
" if (ipaddr == null)\n" \
« no previous file with comments | « net/data/proxy_resolver_v8_unittest/pac_library_unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698