Skip to content

Fix Port Handling in URL to Avoid Invalid Redirection - #2939

Merged
kunwp1 merged 4 commits into
masterfrom
chris-email-notification-port-number
Oct 22, 2024
Merged

kunwp1 merged 4 commits into
masterfrom
chris-email-notification-port-number

Conversation

@kunwp1

@kunwp1 kunwp1 commented Oct 15, 2024

Copy link
Copy Markdown
Contributor

This PR addresses a port handling issue in URL generation to prevent invalid redirection. It introduces logic to check if the port is -1 (not specified), 80 (default HTTP port), or 443 (default HTTPS port). When the port matches any of these conditions, it is omitted from the URL.

Currently, even if the port number is not specified, it still appears in the generated URL, leading to incorrect redirection. This fix ensures that URLs are properly formatted to avoid such issues.

[The screenshot of the current issue]
Screenshot 2024-10-15 at 11 48 55 AM

@kunwp1
kunwp1 requested a review from aglinxinyuan October 15, 2024 18:51
@kunwp1 kunwp1 self-assigned this Oct 15, 2024

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kunwp1
kunwp1 merged commit fe0fdf0 into master Oct 22, 2024
@kunwp1
kunwp1 deleted the chris-email-notification-port-number branch October 22, 2024 08:50
PurelyBlank pushed a commit that referenced this pull request Dec 4, 2024
This PR addresses a port handling issue in URL generation to prevent
invalid redirection. It introduces logic to check if the port is `-1`
(not specified), `80` (default HTTP port), or `443` (default HTTPS
port). When the port matches any of these conditions, it is omitted from
the URL.

Currently, even if the port number is not specified, it still appears in
the generated URL, leading to incorrect redirection. This fix ensures
that URLs are properly formatted to avoid such issues.

[The screenshot of the current issue]
<img width="740" alt="Screenshot 2024-10-15 at 11 48 55 AM"
src="https://github.com/user-attachments/assets/2da0d8ad-a58f-48bb-8c22-6f128d36021f">

Co-authored-by: Kunwoo Park <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
This PR addresses a port handling issue in URL generation to prevent
invalid redirection. It introduces logic to check if the port is `-1`
(not specified), `80` (default HTTP port), or `443` (default HTTPS
port). When the port matches any of these conditions, it is omitted from
the URL.

Currently, even if the port number is not specified, it still appears in
the generated URL, leading to incorrect redirection. This fix ensures
that URLs are properly formatted to avoid such issues.

[The screenshot of the current issue]
<img width="740" alt="Screenshot 2024-10-15 at 11 48 55 AM"
src="https://github.com/user-attachments/assets/2da0d8ad-a58f-48bb-8c22-6f128d36021f">

Co-authored-by: Kunwoo Park <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
This PR addresses a port handling issue in URL generation to prevent
invalid redirection. It introduces logic to check if the port is `-1`
(not specified), `80` (default HTTP port), or `443` (default HTTPS
port). When the port matches any of these conditions, it is omitted from
the URL.

Currently, even if the port number is not specified, it still appears in
the generated URL, leading to incorrect redirection. This fix ensures
that URLs are properly formatted to avoid such issues.

[The screenshot of the current issue]
<img width="740" alt="Screenshot 2024-10-15 at 11 48 55 AM"
src="https://github.com/user-attachments/assets/2da0d8ad-a58f-48bb-8c22-6f128d36021f">

Co-authored-by: Kunwoo Park <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants