Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Mawr
4 months ago
|
parent
|
context
|
favorite
| on:
Python’s new t-strings
But you have to remember to call the right safe() function every time:
db.execute(f"QUERY WHERE name = {name}") db.execute(f"QUERY WHERE name = {safe_html(name)}")
Oops, you're screwed and there is nothing that can detect that. No such issue with a t-string, it cannot be misused.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: