Commit 5513b9d
committed
Unquote connection string components properly
When a connection string component contains characters that have a
special meaning in the URI (e.g. '@' or '='), percent-encoding must be
used. asyncpg must take care to unquote the parsed components
correctly, and it doesn't currently.
Additionally, this makes asyncpg follow the libpq's behavior of parsing
the authentication part of netloc, i.e. split on the first '@' and not
the last.
Fixes: #418
Fixes: #4711 parent e8e238f commit 5513b9d
2 files changed
+62
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| 194 | + | |
| 195 | + | |
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
| |||
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
216 | | - | |
| 221 | + | |
217 | 222 | | |
218 | | - | |
| 223 | + | |
219 | 224 | | |
220 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
221 | 234 | | |
222 | | - | |
223 | | - | |
| 235 | + | |
| 236 | + | |
224 | 237 | | |
225 | 238 | | |
226 | | - | |
227 | | - | |
228 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
229 | 243 | | |
230 | | - | |
231 | | - | |
| 244 | + | |
| 245 | + | |
232 | 246 | | |
233 | | - | |
234 | | - | |
| 247 | + | |
| 248 | + | |
235 | 249 | | |
236 | 250 | | |
237 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
456 | 491 | | |
457 | 492 | | |
458 | 493 | | |
| |||
0 commit comments