Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Mar 21, 2024

Summary

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

Checklist

@susnux susnux added bug 3. to review Waiting for reviews labels Mar 21, 2024
@susnux susnux added this to the Nextcloud 29 milestone Mar 21, 2024
@susnux susnux requested review from a team, Altahrim, nfebe and sorbaugh and removed request for a team March 21, 2024 18:03
@susnux
Copy link
Contributor Author

susnux commented Mar 21, 2024

BTW this was introduced with Nextcloud 28 and the update to Doctrine 3.7

@susnux
Copy link
Contributor Author

susnux commented Mar 21, 2024

/backport to stable28

@susnux susnux requested a review from nickvergessen March 21, 2024 18:03
@Altahrim Altahrim mentioned this pull request Mar 21, 2024
@solracsf

This comment was marked as resolved.

@susnux
Copy link
Contributor Author

susnux commented Mar 23, 2024

For the future I fixed it upstream: doctrine/dbal#6344

@susnux susnux force-pushed the fix/ipv6-postgres branch from e74b0f5 to 4c49d12 Compare March 23, 2024 17:30
Copy link
Member

@nickvergessen nickvergessen left a 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?

@Altahrim Altahrim mentioned this pull request Mar 25, 2024
@susnux
Copy link
Contributor Author

susnux commented Mar 25, 2024

@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.

@nickvergessen
Copy link
Member

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot use database over IPv6

5 participants