[PR #2360] [MERGED] Handling invalid UTF-8 character in sys info #15022

Closed
opened 2026-08-05 03:06:48 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2360
Author: @pappz
Created: 7/31/2024
Status: Merged
Merged: 8/1/2024
Merged by: @mlsmaycon

Base: mainHead: fix/invalid-serial


📝 Commits (5)

  • ffb5515 Handling invalid UTF-8 character in sys info
  • 0c41009 Fix name of tests
  • c70d2e7 Fix os depended definition
  • 745545b Run sysinfo test on Linux only
  • f8804ed Add more verbose info for pb.Marshal error

📊 Changes

5 files changed (+264 additions, -16 deletions)

View changed files

📝 client/system/info_darwin_test.go (+3 -2)
📝 client/system/info_linux.go (+50 -13)
client/system/sysinfo_linux.go (+12 -0)
client/system/sysinfo_linux_test.go (+198 -0)
📝 encryption/message.go (+1 -1)

📄 Description

Describe your changes

In some operation systems, the sys info contains invalid characters.
In this patch try to keep the original fallback logic but filter out the cases when the character is invalid.
See more details in 2319 ticket

https://github.com/netbirdio/netbird/issues/2319

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/2360 **Author:** [@pappz](https://github.com/pappz) **Created:** 7/31/2024 **Status:** ✅ Merged **Merged:** 8/1/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `fix/invalid-serial` --- ### 📝 Commits (5) - [`ffb5515`](https://github.com/netbirdio/netbird/commit/ffb5515a79039a3c53455961850762607cdd258a) Handling invalid UTF-8 character in sys info - [`0c41009`](https://github.com/netbirdio/netbird/commit/0c41009e8262eacac794431b1a3362b56d58165a) Fix name of tests - [`c70d2e7`](https://github.com/netbirdio/netbird/commit/c70d2e766ed562c9342b8611a6d11153608e99e8) Fix os depended definition - [`745545b`](https://github.com/netbirdio/netbird/commit/745545bbaf5550f8783eba389a78fe4b34acaff5) Run sysinfo test on Linux only - [`f8804ed`](https://github.com/netbirdio/netbird/commit/f8804edf8e675a12d90ec0423f6e5baceb6f7ae2) Add more verbose info for pb.Marshal error ### 📊 Changes **5 files changed** (+264 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `client/system/info_darwin_test.go` (+3 -2) 📝 `client/system/info_linux.go` (+50 -13) ➕ `client/system/sysinfo_linux.go` (+12 -0) ➕ `client/system/sysinfo_linux_test.go` (+198 -0) 📝 `encryption/message.go` (+1 -1) </details> ### 📄 Description ## Describe your changes In some operation systems, the sys info contains invalid characters. In this patch try to keep the original fallback logic but filter out the cases when the character is invalid. See more details in 2319 ticket ## Issue ticket number and link https://github.com/netbirdio/netbird/issues/2319 ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 03:06:48 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#15022