Skip to content

test(trino): cover a long-form IPv6 host against a short nextUri - #1093

Merged
cevheri merged 1 commit into
libredb:mainfrom
MohamedIdhries:fix/trino-nexturi-origin-verification
Sep 24, 2026
Merged

cevheri merged 1 commit into
libredb:mainfrom
MohamedIdhries:fix/trino-nexturi-origin-verification

Conversation

@MohamedIdhries

Copy link
Copy Markdown
Contributor

…(fixes #1087)

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Related Issue

Closes #

Changes Made

Testing

  • I have tested this locally
  • I have added/updated tests
  • All existing tests pass

Test Environment

  • LibreDB Studio Version:
  • Browser:
  • OS:
  • Node.js/Bun Version:
  • Database Type:

Screenshots (if applicable)

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The required CI test job passes the 100% line-coverage gate (bun run test:coverage and bun run coverage:check)
  • If I changed src/lib/db/providers/, I updated the matching docs/providers/ documentation and tests/integration/db/ tests in the same PR (provider triad)
  • Any dependent changes have been merged and published

Additional Notes

@cevheri

cevheri commented Sep 23, 2026

Copy link
Copy Markdown
Member

hi @MohamedIdhries
this issue was taken
chose another one, for example: #976

@cevheri cevheri added the duplicate This issue or pull request already exists label Sep 23, 2026
The existing IPv6 case cannot fail against a plain string compare: URL
rewrites the link's host to [::1] before the check runs, so both sides
are already the same string. Configure the long spelling and send the
short one, next to the existing case.

Refs libredb#1087
@cevheri
cevheri force-pushed the fix/trino-nexturi-origin-verification branch from 7156396 to 55ae260 Compare September 24, 2026 20:09
@cevheri cevheri changed the title fix(db/trino): enforce connection origin validation on nextUri links … test(trino): cover a long-form IPv6 host against a short nextUri Sep 24, 2026
@cevheri
cevheri merged commit 2253ca4 into libredb:main Sep 24, 2026
24 checks passed
@cevheri

cevheri commented Sep 24, 2026

Copy link
Copy Markdown
Member

@MohamedIdhries I changed my mind on this one. #1090 landed the same check first, so I rebased your branch onto main and cut it down to the one piece main still lacked: your IPv6 test with the spellings swapped, long form configured and short form in the link. The old case passed even against a plain ===, this one does not. I force-pushed your branch, so reset your local copy before reusing it. Merged, thanks for the work. #976 is open if you want another one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trino: hold the nextUri links to the connection's own origin

2 participants