Conversation
Assigning the public host to a `URL` and then clearing `.port` drops any non-default port, so `:3123` disappears from OAuth `redirect_uri` values and from auth redirects. Self-hosted deployments that do not sit on 80/443 get redirected to a URL that does not resolve. The same pattern was in three places, not two: `proxy.ts`, `request.ts` and `auth-redirect.ts:70`. Tests: the two existing suites keep passing (8/8 in `packages/utils`, 4/4 in `apps/builder`), and reverting only the three source files while keeping the new assertions turns 2 of 8 and 2 of 4 red — so the coverage is real. Fixes ChatbotXIO#1152
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.
Fixes #1152.
Assigning the public host to a
URLand then clearing.portdrops any non-default port, so:3123(or whatever port a self-hosted deployment uses) disappears from OAuthredirect_urivalues and from auth redirects. The operator is sent to a URL that does not resolve.The same pattern was in three places, not the two named in the issue.
auth-redirect.ts:70has it too; we found it while writing the report, and it is included here.Verification
packages/utils: 8/8 passingapps/builder: 4/4 passingultracite checkclean on all five filesAnd the assertions are not decorative. Reverting only the three source files while keeping the new tests turns 2 of 8 and 2 of 4 red — so the coverage tracks the fix rather than accompanying it.