incuna / django-pgcrypto-fields

Transparent field level encryption for Django using the pgcrypto postgresql extension.
BSD 2-Clause "Simplified" License
231 stars 51 forks source link

Fix single quote and percent character in PGCRYPTO_KEY #321

Open khattori opened 3 years ago

khattori commented 3 years ago

Fixes #319

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1292


Totals Coverage Status
Change from base Build 1288: 0.0%
Covered Lines: 149
Relevant Lines: 149

💛 - Coveralls
peterfarrell commented 3 years ago

@khattori Thanks for the PR. I'm slightly concerned about all the hoop jumping we are going through to get things properly formatted between ' and % etc.

I am now convinced we should be using Postgres Dollar Quoting and let the DB handle any issues with the string constants:

https://www.postgresqltutorial.com/dollar-quoted-string-constants/

Let's use $pgcrypto$ as our tag.