Mercurial > hg > release > icedtea-web-1.5
changeset 966:dc0a77856cb4
Merge
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Mon, 31 Mar 2014 13:27:48 -0400 |
parents | ec7b04725a82 (current diff) 79a3a7a01760 (diff) |
children | 70d23452ac83 |
files | ChangeLog |
diffstat | 3 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Mar 31 13:26:39 2014 -0400 +++ b/ChangeLog Mon Mar 31 13:27:48 2014 -0400 @@ -14,6 +14,15 @@ Enclose list in 'ul' element. 2013-03-31 Jiri Vanek <jvanek@redhat.com> + + Allowed wrong match of the aaaexample.com by *.example.com expression as in + specification. + * netx/net/sourceforge/jnlp/util/ClasspathMatcher.java: uncommented handling + of dot in (domainToRegEx). + * tests/netx/unit/net/sourceforge/jnlp/util/ClasspathMatcherTest.java: + (matchTest) uncommented and added tests of/for dot issue. + +2013-03-31 Jiri Vanek <jvanek@redhat.com> Alexandr Kolouch <skolnag@gmail.com> Fixed cz_CS locales and adapted tests
--- a/netx/net/sourceforge/jnlp/util/ClasspathMatcher.java Mon Mar 31 13:26:39 2014 -0400 +++ b/netx/net/sourceforge/jnlp/util/ClasspathMatcher.java Mon Mar 31 13:27:48 2014 -0400 @@ -146,10 +146,11 @@ } private static Pattern domainToRegEx(String domain) { - // I have conisdered the "dot" as bug i specification - // while (domain.startsWith("*.")) { - // domain = "*" + domain.substring(2); - //} + // Although I have conisdered the "dot" as bug in specification, + // to many applications are depnding on it + while (domain.startsWith("*.")) { + domain = "*" + domain.substring(2); + } return ClasspathMatcher.sourceToRegEx(domain); } }
--- a/tests/netx/unit/net/sourceforge/jnlp/util/ClasspathMatcherTest.java Mon Mar 31 13:26:39 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/util/ClasspathMatcherTest.java Mon Mar 31 13:27:48 2014 -0400 @@ -422,9 +422,13 @@ Assert.assertTrue(p.match(urls[13])); Assert.assertTrue(p.match(urls[14])); //those represent the "dot" issue - //Assert.assertTrue(p.match(urls[15])); - //Assert.assertTrue(p.match(urls[16])); + Assert.assertTrue(p.match(urls[15])); + Assert.assertTrue(p.match(urls[16])); Assert.assertFalse(p.match(urls[17])); + //reasons for alowing "dot" issue + Assert.assertTrue(p.match(new URL("http://www.example.com"))); + Assert.assertTrue(p.match(new URL("http://example.com"))); //yah, this is really nasty + //still the DOT issue is an BUG } @Test