utPLSQL / utPLSQL-cli

Command line client for invoking utPLSQL
Apache License 2.0
40 stars 15 forks source link

ORA-01017: invalid username/password; logon denied when password contains "$6" #211

Closed sau2382 closed 1 year ago

sau2382 commented 1 year ago

I am seeing ORA-01017: invalid username/password; logon denied when invoking UTPSQL via CLI. The DB password contains "$6" which is skipped when parsing the command line arguments. The parsed connection string shows password with "$6" missing.

Example password - Abcd$6789 cli command - utplsql run -d "username"/"Abcd$6789"@dbhost:port/service_any

Following logs while running CLI -

4:59:05.582 [main] DEBUG org.utplsql.cli.Cli - Args: run, username/Abcd789@dbhost:port/service_any 
###################### utPLSQL cli ######################
#                                                       #
#   utPLSQL-cli 3.1.9.local                             #
#   utPLSQL-java-api 3.1.9.local                        #
#   Java-Version: 1.8.0_251                             #
#   ORACLE_HOME: /oraclient/product/19.4.0.0.0/client   #
#   NLS_LANG: null                                      #
#                                                       #
#   Thanks for testing!                                 #
#                                                       #
#########################################################

jdbc:oracle:oci8:****/****@dbhost:port/service_any : no ocijdbc19 in java.library.path
jdbc:oracle:thin:****/****@dbhost:port/service_any : ORA-01017: invalid username/password; logon denied

Could not establish connection to database. Reason: ORA-01017: invalid username/password; logon denied
jgebal commented 1 year ago

As a workaround, can you try to escape the $ in password with a backslash \ symbol? Abcd\$6789

sau2382 commented 1 year ago

Thanks @jgebal for the prompt response. Adding escape character as a workaround is working and I can see test result and coverage. Not really sure but I believe if a provision can be given to pass user/password as a separate switch parameter this issue will be avoided. Anyways thanks for the quick support.