Skip to content

Cannot connect to DB when password contains @ symbol #218

@justicenyaga

Description

@justicenyaga

I'm unable to connect to an Oracle database when my password contains an @ symbol. The connection fails because the @ character is being interpreted as part of the connection string syntax (delimiter between credentials and host) rather than as part of the password itself.

Steps to Reproduce

  1. Attempt to connect to Oracle DB with a password containing @
  2. Use connection string format: oracle://user:p@ssword@host:port/service
  3. Connection fails with ORA-12262

Error Message

ORA-12262: Cannot connect to database. Could not resolve hostname
321@xx.xx.xx.xx in Easy Connect connection string 321@xx.xx.xx.xx/CUSAPP
Help: https://docs.oracle.com/error-help/db/ora-12262/
SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus
Help: https://docs.oracle.com/error-help/db/sp2-0751/

The error shows that the connection string is being incorrectly parsed, with part of the credentials being treated as the hostname.

Attempted Workaround

  • Tried URL encoding @ as %40: oracle://user:p%40ssword@host:port/service
    • Result: Still fails with the same error - URL encoding is not being respected

Expected Behavior

The plugin should handle special characters in passwords properly through URL encoding or proper escaping before passing the connection string to the Oracle client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions