SSH address broken if IPv6 is used #3614

Closed
opened 2025-11-02 05:19:32 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @fakuivan on GitHub (Jul 17, 2019).

  • Gitea version (or commit ref): 1.10.0+dev-59-gf1ca8ed04
  • Git version (server): 2.22.0
  • Operating system: Docker (Linux 7ca71e51f279 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 Linux)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: Not relevant

Description

IPv6 addresses for ssh passed as SSH_DOMAIN gets cut (on the UI side at least) to the first : presumably because the algorithm used to split the port number and address splits from left to right with no limit as to how many times it should do it.

I'm not familiar with golang or the framework used in this case, but I think the error has something to do with this
image

Screenshots

image

Originally created by @fakuivan on GitHub (Jul 17, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.10.0+dev-59-gf1ca8ed04 - Git version (server): 2.22.0 - Operating system: Docker (Linux 7ca71e51f279 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 Linux) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: _Not relevant_ ## Description IPv6 addresses for ssh passed as ``SSH_DOMAIN`` gets cut (on the UI side at least) to the first ``:`` presumably because the algorithm used to split the port number and address splits from left to right with no limit as to how many times it should do it. I'm not familiar with golang or the framework used in this case, but I think the error has something to do with this ![image](https://user-images.githubusercontent.com/15100012/61418822-3ce8d080-a8d2-11e9-8835-0a3436eb8341.png) ## Screenshots ![image](https://user-images.githubusercontent.com/15100012/61418774-001cd980-a8d2-11e9-9507-221255ee6936.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 05:19:32 -06:00
Author
Owner

@stale[bot] commented on GitHub (Sep 16, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Sep 16, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3614