Skip to content

Commit

Permalink
revert unquote/requote
Browse files Browse the repository at this point in the history
  • Loading branch information
hay-kot committed Apr 7, 2024
1 parent fb1bdfe commit d6d6869
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions mealie/core/settings/db_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,11 @@ def db_url(self) -> str:

return safe_url

# We unquote and then requote the password to ensure that it is correctly encoded
# This is necessaru because of a bug introduced that caused some users to modify their
# passwords to escape the characters manully. In an effort _not_ to break those users
# we will unquote and requote the password to ensure it is correctly encoded
password = urlparse.unquote(self.POSTGRES_PASSWORD)
password = urlparse.quote(password)

return str(
PostgresDsn.build(
scheme="postgresql",
username=self.POSTGRES_USER,
password=password,
password=urlparse.quote(self.POSTGRES_PASSWORD),
host=f"{self.POSTGRES_SERVER}:{self.POSTGRES_PORT}",
path=f"{self.POSTGRES_DB or ''}",
)
Expand Down

0 comments on commit d6d6869

Please sign in to comment.