top | item 43751976

(no title)

Tenoke | 10 months ago

The sanitization. Just using a t-string in your old db.execute doesn't imply anything safer is going on than before.

discuss

order

nemetroid|10 months ago

Your "old" db.execute (which presumably accepts a regular old string) would not accept a t-string, because it's not a string. In the original example, it's a new db.execute.

masklinn|10 months ago

Using a t-string in a db.execute which is not compatible with t-strings will result in an error.

Using a t-string in a db-execute which is, should be as safe as using external parameters. And using a non-t-string in that context should (eventually) be rejected.

Tenoke|10 months ago

Again, just because a function accepts a t string it doesn't mean there's sanitization going on by default.