Skip to content

Using non-ascii character in database password is not allowed in asyncpg, but postgresql allows non-ascci character in its password. #1018

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

Closed
sumitsharansatsangi opened this issue Mar 24, 2023 · 0 comments · Fixed by #1062

Comments

@sumitsharansatsangi
Copy link

Hi, I was trying to insert a non-ascii character in the postgresql database password,
It works perfectly fine with the postgresql, Tried to connect using Beekeeper and works successfully.
I was able to connect my database, do some operation , everything was perfectly fine.

But when I tried to use it with asyncpg , it gives following error.

Traceback (most recent call last):
  File "asyncpg/protocol/coreproto.pyx", line 154, in asyncpg.protocol.protocol.CoreProtocol._process__auth
  File "asyncpg/protocol/coreproto.pyx", line 561, in asyncpg.protocol.protocol.CoreProtocol._parse_msg_authentication
  File "asyncpg/protocol/coreproto.pyx", line 649, in asyncpg.protocol.protocol.CoreProtocol._auth_password_message_md5
UnicodeEncodeError: 'ascii' codec can't encode characters in position 19-23: ordinal not in range(128)

I want to know , why the limitation from asyncpg, when postgresql is allowing it.

I request you to please remove the limitation , if there is no special reason to put it.

Thank you.

elprans added a commit that referenced this issue Aug 15, 2023
elprans added a commit that referenced this issue Aug 17, 2023
elprans added a commit that referenced this issue Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant