Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Escaping password in oracle connection string (pass containing semicolons, quotes etc)

Re: Escaping password in oracle connection string (pass containing semicolons, quotes etc)

From: Niall Litchfield <niall.litchfield_at_gmail.com>
Date: Tue, 13 Nov 2007 14:12:14 -0000
Message-ID: <1194963134.220380.279450@o80g2000hse.googlegroups.com>


On Nov 12, 8:59 pm, Am <amiran.c..._at_gmail.com> wrote:
> Hi there
>
> I've just found the problem in application I'm working on (c#, .net
> 2.0) - since at some point it merges the connection string from
> unquoted attributes values (user=username;password=pass etc.) the
> native oracle access object throws exception when the password
> contains semicolon.
> Msdn describing default microsoft oracle access class (http://
> msdn2.microsoft.com/en-us/library/
> system.data.oracleclient.oracleconnection.connectionstring(VS.
> 80).aspx) says that one can always quote the whole value with double-
> quotes and escape each additional double quote in password by adding
> another one in front of it.

well a password containing a semi-colon doesn't seem especially sensible to me - not as bad as one with untypable characters but still.

> Hence there's no way to escape all possible passwords unless:
> a) there's other way to connect than through fully merged connection
> string (e.g. by passing attributes individually)

how about os authentication - don't pass the password at all.

Niall Received on Tue Nov 13 2007 - 08:12:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US