Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL provider doesn't support special characters for authentication on Windows #41132

Closed
andreasneumann opened this issue Jan 22, 2021 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider

Comments

@andreasneumann
Copy link
Member

andreasneumann commented Jan 22, 2021

PostgreSQL provider doesn't support special characters in role passwords on Windows

When using special characters in the PostgreSQL password of a role, it seems like special characters (such as German Umlauts and maybe others) aren't properly supported on the Windows platform.

Our tests have shown that it runs fine on Linux (probably also MacOS (untested)), but fails on Windows.

How to Reproduce

  1. Create a PostgreSQL role with a password with special characters, e.g. "Härdöpfel$5§_4"
  2. Create the necessary permissions on the DB, schema and tables so that the user can access some tables in any DB
  3. Try to connect with the password on Windows

QGIS and OS versions

Tested on Windows Server 2012, with QGIS 3.10, 3.16 and master.

@andreasneumann andreasneumann added Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider backport release-3_16 labels Jan 22, 2021
@jef-n jef-n changed the title PostgreSQL provider doesn't support special characters on Windows PostgreSQL provider doesn't support special characters for authentication on Windows Jan 22, 2021
@gioman
Copy link
Contributor

gioman commented Jan 22, 2021

@andreasneumann it does matter the OS where PgSQL/PostGIS is installed?

@gioman
Copy link
Contributor

gioman commented Jan 22, 2021

@andreasneumann it does matter the OS where PgSQL/PostGIS is installed?

@andreasneumann nevermind, I confirm the issue.

@andreasneumann
Copy link
Member Author

@andreasneumann it does matter the OS where PgSQL/PostGIS is installed?

In my tests, the PostgreSQL Server was on Linux and QGIS as client on Windows.

Linux PostgreSQL and Linux QGIS was working fine.

rouault added a commit to rouault/QGIS that referenced this issue Jan 23, 2021
…gis#41132)

to avoid issues with non-ASCII passwords, and local encoding different from
database encoding.
github-actions bot pushed a commit that referenced this issue Jan 26, 2021
…41132)

to avoid issues with non-ASCII passwords, and local encoding different from
database encoding.
nyalldawson pushed a commit to nyalldawson/QGIS that referenced this issue Feb 19, 2021
…gis#41132)

to avoid issues with non-ASCII passwords, and local encoding different from
database encoding.

(cherry picked from commit d63717b)
nyalldawson pushed a commit that referenced this issue Feb 19, 2021
…41132)

to avoid issues with non-ASCII passwords, and local encoding different from
database encoding.

(cherry picked from commit d63717b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider
Projects
None yet
Development

No branches or pull requests

2 participants