Commit 6f2c308
committed
Escape bytes parameters as strings, not as ARRAY of ints
With inline parameters, ParamEscaper.escape_item checked for Sequence
before bytes. Since bytes is a Sequence, a bytes value was escaped
element by element (b"hi" became ARRAY(104,105)), and the bytes
handling in escape_string, which decodes UTF-8 for older SQLAlchemy,
was never reached. Route bytes to escape_string.
Signed-off-by: Shubham Padkonde <shubhampadkonde12@gmail.com>1 parent f0ef715 commit 6f2c308
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | | - | |
| 606 | + | |
| 607 | + | |
607 | 608 | | |
608 | 609 | | |
609 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
122 | 130 | | |
123 | 131 | | |
124 | 132 | | |
| |||
0 commit comments