Skip to content

Normalize GitHub Enterprise authentication endpoints to HTTPS - #493

Merged
Sheng Chen (jdneo) merged 5 commits into
mainfrom
copilot/fix-authentication-redirect-issue
Oct 21, 2026
Merged

Sheng Chen (jdneo) merged 5 commits into
mainfrom
copilot/fix-authentication-redirect-issue

Conversation

Copilot AI commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The language server ignores HTTP enterprise authentication endpoints, which could leave sign-in directed to GitHub.com. Normalize supported input to HTTPS instead of requiring users to type the scheme themselves.

  • Normalization: Accept bare hostnames and HTTP/HTTPS URLs, trim surrounding whitespace, and save the normalized HTTPS URL. Preserve explicit ports, paths, and URL escaping. Empty values continue to select GitHub.com.
  • Guidance: Show a live preview of the actual HTTPS authentication address, or the GitHub.com default. Keep the hostname placeholder and explanatory tooltips without replacing the user's input until it is saved.
  • Language server consistency: Reuse the same normalization when loading existing preferences and syncing preference changes. Log and reject invalid updates without replacing the current endpoint or sending an invalid address.
  • Regression coverage: Cover normalization and idempotence, invalid inputs, preview and validation updates, saved values, restored defaults, and language server initialization/change notifications.

Local verification: UI Checkstyle passes, and all 26 normalization regression cases pass using the project's JUnit version. The targeted Maven compilation/UI test run is still blocked because the configured Wild Web Developer target-platform repository cannot be resolved from this environment.

Copilot AI linked an issue Oct 16, 2026 that may be closed by this pull request
Co-authored-by: jdneo <6193897+jdneo@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix authentication redirection to github.com instead of ghe.com Require HTTPS for GitHub Enterprise authentication endpoints Oct 16, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jdneo
Sheng Chen (jdneo) marked this pull request as ready for review October 19, 2026 05:37
Copilot AI balanced review requested due to automatic review settings October 19, 2026 05:37

Copilot AI 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.

🟢 Approval recommended

Static review found no blocking issues in this focused change; build and test execution remain unverified because the target-platform dependency repository was unreachable.

No open issues 🎉

What changed in this PR

Addresses #480 by rejecting invalid enterprise authentication endpoints in Eclipse preferences while preserving empty values for GitHub.com.

Changes:

  • Require HTTPS URLs with a hostname.
  • Add localized validation errors, placeholder text, and tooltips.
  • Add regression tests for saved values, live validation, and native hints.
File Description
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​preferences/​messages.properties Adds HTTPS guidance and validation text.
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​preferences/​Messages.java Declares new localized message fields.
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​preferences/​GeneralPreferencesPage.java Validates endpoints and displays native hints.
com.microsoft.copilot.eclipse.ui.test/​src/​com/​microsoft/​copilot/​eclipse/​ui/​preferences/​GeneralPreferencesPageTest.java Tests validation and value preservation.

Review effort: Balanced

Accept hostnames and HTTP/HTTPS URLs, preview the resolved address, and share normalization across persistence and language server settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jdneo Sheng Chen (jdneo) changed the title Require HTTPS for GitHub Enterprise authentication endpoints Normalize GitHub Enterprise authentication endpoints to HTTPS Oct 19, 2026
@jdneo

Copy link
Copy Markdown
Member

Copilot revert 1f285dc in this pr

Co-authored-by: jdneo <6193897+jdneo@users.noreply.github.com>

Copilot AI commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Copilot revert 1f285dc in this pr

Reverted 1f285dc in commit 230456d.

Copilot revert 1f285dc in this pr

Reverted 1f285dc in commit 230456d.

Copilot AI 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.

🟡 Changes recommended

The implementation rejects supported inputs instead of normalizing them and lacks the promised live authentication-address preview.

2 open issues

Review effort: Balanced

@jdneo
Sheng Chen (jdneo) merged commit e739e76 into main Oct 21, 2026
5 checks passed
@jdneo
Sheng Chen (jdneo) deleted the copilot/fix-authentication-redirect-issue branch October 21, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]

4 participants