Wrong encoding of PsSqlConnection login credentials

Wrong encoding of PsSqlConnection login credentials

Postby kww » Wed 06 May 2009 09:26

Hi,

the encoding of special characters in the UserId and Password property of the PsSqlConnection seems to be wrong:

If i use for example the german special character 'Ä' in these fields, the PgSql connector sends 0x3F to the server, which is ASCII encoding.

It should be 0xC4 in Unicode.

As a result you can't login with special characters in your UserId or Password field.

If I try this with pgAdmin III, everything works fine.

- PgSql Version 3.25.20
- PsSqlConnection.Unicode = true
- PostgreSQL 8.2.4
- Database encoding = UTF8

Thanks for your help
kww
 
Posts: 3
Joined: Wed 06 May 2009 08:47

Postby Shalex » Wed 06 May 2009 13:45

We will investigate the issue and notify you about the results as soon as possible.
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Fri 08 May 2009 11:08

The problem is fixed. Look forward to the next build of dotConnect for PostgreSQL that will be available in 2 weeks.
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Fri 22 May 2009 16:32

The new build of dotConnect for PostgreSQL 4.50.33 is available for download now.
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=14911 .
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44

Postby kww » Thu 29 Apr 2010 08:38

I tried to verify that this bug is resolved, but it is still there!

I used:

- dotConnect 4.90.124.0 TRIAL
- PostgreSQL 8.2.4
- Database encoding = UTF8

Steps to reproduce the error:

1) Create PostgreSQL role (User "Äaaaa" Password "secret"):

CREATE ROLE "Äaaaa" LOGIN ENCRYPTED PASSWORD 'md54234ca052fc626494c0a3ecf0dbc70f2' NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;


2) Login from pgAdmin:

-> OK


3) Login from code:

Devart.Data.PostgreSql.PgSqlConnection conn = new Devart.Data.PostgreSql.PgSqlConnection();
conn.Unicode = true;
conn.Host = "192.168.1.1";
conn.Port = 5432;
conn.UserId = "Äaaaa";
conn.Password = "secret";
conn.Database = "postgres";
conn.Open();

-> password authentication failed for user "?aaaa"


The byte sequence for the user name which is sent by your PgSqlConnection is:
0x3f 0x61 0x61 0x61

It should be (like pgAdmin sends it):
0xc3 0x84 0x61 0x61 0x61


The same problem exists, if you use special characters for the password.

So this error still exists?!

Regards,
kww
kww
 
Posts: 3
Joined: Wed 06 May 2009 08:47

Postby StanislavK » Fri 30 Apr 2010 16:08

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Fri 09 Jul 2010 17:14

We've fixed the problem with connecting to PostgreSQL database as a user with Unicode name. The fix is available in the latest 4.95.146 build of dotConnect for PostgreSQL. The build can be downloaded from
http://www.devart.com/dotconnect/postgresql/download.html
(the trial version) or from Registered Users' Area:
http://secure.devart.com/

For more information on improvements and fixes available in dotConnect for PostgreSQL 4.95.146, please refer to
http://www.devart.com/forums/viewtopic.php?t=18426
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for PostgreSQL