fix(oauth): Accept ports in native loopback redirect registration #2535

Closed
damv wants to merge 1 commit from damv/continuwuity:fix/oauth-loopback-ports into main
First-time contributor

Signed-off-by: Idalen idalenm@proton.me

This pull request improves OAuth interoperability by accepting explicit ports in native HTTP loopback redirect URIs during client registration. It also updates authorization validation to ignore ports on both the registered and requested URIs, while preserving the actual callback URL and port.

Fixes: #2536

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
Signed-off-by: Idalen <idalenm@proton.me> This pull request improves OAuth interoperability by accepting explicit ports in native HTTP loopback redirect URIs during client registration. It also updates authorization validation to ignore ports on both the registered and requested URIs, while preserving the actual callback URL and port. Fixes: #2536 **Pull request checklist:** - [X] This pull request targets the `main` branch, and the branch is named something other than `main`. - [X] I have written an appropriate pull request title and my description is clear. - [X] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [X] My contribution follows the [code style][c2], if applicable. - [X] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [X] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [X] My commit messages follow the [commit message format][c1cm] and are descriptive. [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages
fix(oauth): Accept ports in native loopback redirect registration
Some checks failed
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Check changed files (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
a53f9c51e3
Signed-off-by: Idalen <idalenm@proton.me>
Owner

The spec says that native & loopback registrations must not have ports: https://spec.matrix.org/v1.19/client-server-api/#redirect-uri-validation

The spec says that native & loopback registrations must not have ports: https://spec.matrix.org/v1.19/client-server-api/#redirect-uri-validation
ginger closed this pull request 2026-11-15 17:19:25 +00:00
Some checks failed
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Required
Details
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Required
Details
Checks / Prek / Check changed files (pull_request) Has been cancelled
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity!2535
No description provided.