RFR: JDK-8288207: Enhance MalformedURLException in Uri.parseCompat

Jaikiran Pai jpai at openjdk.java.net
Mon Jun 13 14:33:07 UTC 2022


On Mon, 13 Jun 2022 07:26:32 GMT, Matthias Baesken <mbaesken 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)?

-------------

PR: https://git.openjdk.org/jdk/pull/9126



More information about the security-dev mailing list