[PR #643] [MERGED] Fix occasional panic on registration #1549

Closed
opened 2025-12-29 02:30:31 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/643
Author: @iSchluff
Created: 6/14/2022
Status: Merged
Merged: 6/16/2022
Merged by: @kradalby

Base: mainHead: fix/dns-name-panic


📝 Commits (2)

  • 8f31ed5 fix occasional panic on registration
  • 2215e17 Merge branch 'main' into fix/dns-name-panic

📊 Changes

2 files changed (+25 additions, -7 deletions)

View changed files

📝 utils.go (+10 -4)
📝 utils_test.go (+15 -3)

📄 Description

Introduced by random node suffix: GenerateRandomStringDNSSafe will panic occasionally if the random base64 string contains too many - and _ due to the replacement. Fix by looping.

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/643 **Author:** [@iSchluff](https://github.com/iSchluff) **Created:** 6/14/2022 **Status:** ✅ Merged **Merged:** 6/16/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `fix/dns-name-panic` --- ### 📝 Commits (2) - [`8f31ed5`](https://github.com/juanfont/headscale/commit/8f31ed51e18e80d8e9ceaadf11e03899290a7286) fix occasional panic on registration - [`2215e17`](https://github.com/juanfont/headscale/commit/2215e17223c0c8743dcbe0d98304bcafe24c868a) Merge branch 'main' into fix/dns-name-panic ### 📊 Changes **2 files changed** (+25 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `utils.go` (+10 -4) 📝 `utils_test.go` (+15 -3) </details> ### 📄 Description Introduced by random node suffix: GenerateRandomStringDNSSafe will panic occasionally if the random base64 string contains too many - and _ due to the replacement. Fix by looping. - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [ ] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [ ] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:30:31 +01:00
adam closed this issue 2025-12-29 02:30:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1549