Search code examples
javasecurityldapredhat

OpenJDK remedy for CVE-2022-21496 yields "unsupported authority" exception thrown


After a recent RedHat OpenJDK update, an application is logging the following exception on startup while trying to process its configuration properties:

javax.naming.NamingException: Cannot parse url: ldap://dev_ldap.example.com:389 [Root exception is java.net.MalformedURLException: unsupported authority: dev_ldap.example.com:389]

What is meant by "unsupported authority"? A related RedHat article suggests only to "avoid special characters", but we don't appear to be using any. (Unless it is the underscore that is considered "special"?)


Solution

  • A quick Internet search result: "The use of underscore characters is a little confusing. Underscore characters are not permitted in domain names in accordance with RFC 1035, which only allows letters, digits and hyphens." 1