[OPENDJ-3874] Entering an invalid DN crashes status with a stacktrace Created: 16/Mar/17  Updated: 08/Nov/19  Resolved: 17/Mar/17

Status: Done
Project: OpenDJ
Component/s: config, tools
Affects Version/s: 4.0.0
Fix Version/s: 4.0.0

Type: Bug Priority: Major
Reporter: Ondrej Fuchsik Assignee: Yannick Lecaillez
Resolution: Fixed Votes: 0
Labels: Verified
Environment:

OpenDJ 4.0.0 rev 1b042cdf009291aff8027f4d0ca04fdc9e1c3991


QA Assignee: Ondrej Fuchsik

 Description   

In interactive mode I provided invalid bind dn and I hit following exception:

./bin/status 


>>>> Specify OpenDJ LDAP connection parameters

How do you want to trust the server certificate?

    1)  Automatically trust
    2)  Use a truststore
    3)  Manually validate

Enter choice [3]: 1

Administrator user bind DN [cn=Directory Manager]: cn-admin
Exception in thread "main" org.forgerock.i18n.LocalizedIllegalArgumentException: The provided value "cn-admin" could not be parsed as a valid distinguished name because the last non-space character was part of the attribute name 'cn-admin'
	at org.forgerock.opendj.ldap.Ava.decode(Ava.java:129)
	at org.forgerock.opendj.ldap.Rdn.decode(Rdn.java:179)
	at org.forgerock.opendj.ldap.Dn.decode(Dn.java:272)
	at org.forgerock.opendj.ldap.Dn.valueOf(Dn.java:245)
	at org.forgerock.opendj.ldap.Dn.valueOf(Dn.java:214)
	at org.opends.server.util.cli.LDAPConnectionConsoleInteraction.promptForCredentialLoginIfRequired(LDAPConnectionConsoleInteraction.java:649)
	at org.opends.server.util.cli.LDAPConnectionConsoleInteraction.resolveCredentialLogin(LDAPConnectionConsoleInteraction.java:406)
	at org.opends.server.util.cli.LDAPConnectionConsoleInteraction.run(LDAPConnectionConsoleInteraction.java:356)
	at org.opends.server.tools.status.StatusCli.execute(StatusCli.java:261)
	at org.opends.server.tools.status.StatusCli.mainCLI(StatusCli.java:177)
	at org.opends.server.tools.status.StatusCli.main(StatusCli.java:140)



 Comments   
Comment by Ondrej Fuchsik [ 21/Mar/17 ]

Issue verified with OpenDJ-4.0.0 rev 75ee4635651742521e7f21e9ed0b8b26b4cd1e20

Generated at Mon Nov 30 14:13:08 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.