RFR: JDK-8288207: Enhance MalformedURLException in Uri.parseCompat
Matthias Baesken
mbaesken at openjdk.java.net
Mon Jun 13 14:48:06 UTC 2022
On Mon, 13 Jun 2022 14:29:44 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> > Hi Daniel, should we maybe better print something like "check for not allowed characters" in the exception ? Do you have an easy and cheap way in mind to the get the unsupported character (in this case "_") to add it to the output ? Would maybe be more helpful than the proposed host:port and better regarding security concerns.
>
> Hello Matthias, the current error message is:
>
> > java.net.MalformedURLException: unsupported authority: ad_jbs.ttt.net:389
>
> Are you suggesting that the error message should include some additional wording which states why the authority isn't supported (in this case because of the presence of that `_` character)?
Yes , this is what I meant. Ideally (and if it is not much overhead/easy to get) we show the 'bad' character in the message. Otherwise just some additional wording.
-------------
PR: https://git.openjdk.org/jdk/pull/9126
More information about the security-dev
mailing list