-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(DB): Sanitize host
parameter for postgres databases when IPv6 address is passed
#44394
Conversation
BTW this was introduced with Nextcloud 28 and the update to Doctrine 3.7 |
/backport to stable28 |
This comment was marked as resolved.
This comment was marked as resolved.
For the future I fixed it upstream: doctrine/dbal#6344 |
e74b0f5
to
4c49d12
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a test is too complicated/artificial I guess?
@nickvergessen I am not sure how to test this, for unit tests I would need to mock a static function. For integration tests we would need a specific database configuration. |
yeah, that's exactly what I mean. |
…ddress is passed Doctrine is using `pg_connect` with the `host` parameter, this does not allow IPv6 addresses in URI notation. So we need to extract the IP address and pass it directly Signed-off-by: Ferdinand Thiessen <[email protected]>
4c49d12
to
2525e73
Compare
Summary
Doctrine is using
pg_connect
with thehost
parameter, this does not allow IPv6 addresses in URI notation. So we need to extract the IP address and pass it directlyChecklist