commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [continuum] BUILD FAILURE: Apache Commons Validator - Apache Commons (Group (shared) Maven 3 Build Definition (Java 1.6))
Date Wed, 14 Jan 2015 11:47:02 GMT
On 14 January 2015 at 07:48, Benedikt Ritter <britter@apache.org> wrote:
> 2015-01-13 23:11 GMT+01:00 sebb <sebbaz@gmail.com>:
>
>> On 13 January 2015 at 22:02, sebb <sebbaz@gmail.com> wrote:
>> > Rats! Looks like a bug here:
>> >
>> > final String authorityASCII = DomainValidator.unicodeToASCII(authority);
>> >
>> > This is supposed to leave the input string along if it cannot convert
>> > punycode, but it appears to have dropped the final "." when converting
>> > "www.cnn.com.."
>> >
>> > Don't know why that was not noticed before.
>>
>> Yes, I do - the NET.unicodeToASCII method was only invoked previously
>> if the host contained non-ASCII characters.
>> This was to make sure the Java 6 method was not used unless necessary.
>>
>> So it would not have been used before in the tests.
>>
>> We need another test for .. after IDN hosts.
>>
>> I think the 1.4.1 release is OK.
>>
>> However it will presumably allow IDN hosts with .. at the end.
>> Not sure that is terribly serious.
>>
>
> I've only tested with Java 8 before committing my changes. Maybe this is a
> bug in IDN only in Java 6? Sorry for this and thank you for fixing the
> issue!

We don't (yet) have any tests with IDN host names and additional trailing dots.
The 1.4.1 code does not use IDN.toASCII if the hostname is already
ASCII, so the version of Java used to test 1.4.1 won't make a
difference.

I've not yet tested to see which versions of IDN.toAscii have the bug.

Nor has the issue been fixed for the next version; it has only been
hacked to work as it did previously, i.e. trailing twin dots will only
cause ASCII names to fail.

In our case there is a simple work-round - fail the checks if the
authority ends with more than one dot (probably ought to check for the
other characters that are treated as being equivalent to dot).
This check obviously has to be done before calling IDN.toAscii as that
method currently destroys some of the evidence!

> Benedikt
>
>
>>
>> >
>> > On 13 January 2015 at 21:46, sebb <sebbaz@gmail.com> wrote:
>> >> Yes.
>> >> Just updated my workspace and ran test and it failed.
>> >>
>> >> I've also updated Continuum to 1.6 and that failed too
>> >>
>> >> On 13 January 2015 at 21:41, Gary Gregory <garydgregory@gmail.com>
>> wrote:
>> >>> Is anyone else getting:
>> >>>
>> >>> commons-validator
>> >>> org.apache.commons.validator.routines.UrlValidatorTest
>> >>> testIsValid(org.apache.commons.validator.routines.UrlValidatorTest)
>> >>> junit.framework.AssertionFailedError:
>> http://1.2.3.4./test1?action=view
>> >>> expected:<false> but was:<true>
>> >>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message