[PR #850] [MERGED] Fix preshared key command line arg handling #13074

Closed
opened 2026-08-05 02:07:24 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/850
Author: @pappz
Created: 5/11/2023
Status: Merged
Merged: 5/11/2023
Merged by: @braginini

Base: mainHead: 845-netbird-pre-shared-key-got-removed-with-every-connection


📝 Commits (1)

  • 7fabe08 Fix preshared key command line arg handling

📊 Changes

2 files changed (+14 additions, -6 deletions)

View changed files

📝 client/cmd/login.go (+7 -3)
📝 client/cmd/up.go (+7 -3)

📄 Description

Describe your changes

Fix preshared key command line arg handling

The cmd line arg processing does not differentiate the sting from the
string pointer. So if the user does not set a preshared-key the code
will overwrite it with empty string.

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/850 **Author:** [@pappz](https://github.com/pappz) **Created:** 5/11/2023 **Status:** ✅ Merged **Merged:** 5/11/2023 **Merged by:** [@braginini](https://github.com/braginini) **Base:** `main` ← **Head:** `845-netbird-pre-shared-key-got-removed-with-every-connection` --- ### 📝 Commits (1) - [`7fabe08`](https://github.com/netbirdio/netbird/commit/7fabe08eb5afafc053afa93bf376a3283a553087) Fix preshared key command line arg handling ### 📊 Changes **2 files changed** (+14 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/login.go` (+7 -3) 📝 `client/cmd/up.go` (+7 -3) </details> ### 📄 Description ## Describe your changes Fix preshared key command line arg handling The cmd line arg processing does not differentiate the sting from the string pointer. So if the user does not set a preshared-key the code will overwrite it with empty string. ## Issue ticket number and link ### 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 02:07:24 -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#13074