Skip to content

Merge 4.2.x up into 4.3.x#6905

Merged
morozov merged 1 commit into4.3.xfrom
4.2.x
Apr 12, 2025
Merged

Merge 4.2.x up into 4.3.x#6905
morozov merged 1 commit into4.3.xfrom
4.2.x

Conversation

@morozov
Copy link
Member

@morozov morozov commented Apr 12, 2025

No description provided.

…6790)

|      Q       |   A
|------------- | -----------
| Type         | improvement
| Fixed issues | #6789

#### Summary

Previously the DsnParser unconditionally removed the first character
from the path, without verifying that it is actually a slash and that it
is dealing with a reasonably well-formed URI. This causes confusing
behavior when a malformed URI that survives `parse_url()` is passed to
`parse()`, since DsnParser would return the input as the `dbname`, but
with the first character missing.

This can lead to hard-to-debug situations when the DSN is coming from an
environment variable, where quoting characters are accidentally included
in the value itself, instead of being interpreted by the tool setting
the env, since the `dbname` almost looks like the intended input (but
still having the trailing quote).

see #6789
@morozov morozov marked this pull request as ready for review April 12, 2025 15:37
@morozov morozov merged commit 662b2b0 into 4.3.x Apr 12, 2025
360 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants