fix(core): preserve Unix socket SQL config in DbServiceFactory#198
Merged
Conversation
3 tasks
ralflang
requested changes
Jul 10, 2026
ralflang
left a comment
Member
There was a problem hiding this comment.
Please factor out the SQL topic from the OAuth topic into separate PRs. The OAuth topic looks wrong, the SQL topic looks mostly correct.
85747aa to
a4f924d
Compare
Contributor
Author
|
Done — the PR is now SQL-only. |
Ensure the parameter filter doesn't drop unix socket parameters and defaults to localhost tcp/ip connection
a4f924d to
e62577d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DbServiceFactory::buildConnectionConfig()droppingprotocol=unixand forcinglocalhost:3306, which broke rampage admin pages on PostgreSQL Unix-socket deploymentsMotivation
Opening
/admin/authentication/provider/(or any rampage route that resolvesPermissionService) on an instance using PostgreSQL over a Unix socket failed withPDOException: SQLSTATE[08006] ... localhost:3306 refused.PermissionServiceFactoryresolves its connection throughDbServiceFactory, which rebuilt the SQL config from a key whitelist with MySQL TCP defaults instead of preserving the socket settings fromconf.php.Changes
buildConnectionConfig()now applies the same normalization asDbAdapterFactory(hostspec->host, dropdriverconfig, defaultcharset) and passes everything else through --protocol/socketreach the adapter untouched, and no host/port defaults are inventedtest/Unit/Factory/DbServiceFactoryTest.phpReview follow-up
Split per review: this PR now contains only the SQL topic. The OAuth repository fallback was dropped entirely (see horde/base#134 for the conclusion on that side).
Test plan
vendor/bin/phpunit -c phpunit.xml.dist test/Unit/Factory/DbServiceFactoryTest.phpPermissionServiceconnects withprotocol=unixPostgreSQL config/horde/admin/authentication/provider/renders on a PostgreSQL Unix-socket deployment