Fix review

* Remove ui binary
* Fix getProfileConfigPath not validating id
This commit is contained in:
Theodor S. Midtlien
2026-06-16 19:10:56 +02:00
parent 2e7b5f7192
commit abb67e9edb
2 changed files with 5 additions and 4 deletions

View File

@@ -203,10 +203,11 @@ func (pm *ProfileManager) RemoveProfile(id string) error {
// getProfileConfigPath returns the config file path for a profile
// This is needed for Android-specific path handling (netbird.cfg for default profile)
func (pm *ProfileManager) getProfileConfigPath(id string) (string, error) {
if id == "" || id == profilemanager.DefaultProfileName {
if !profilemanager.IsValidProfileFilenameStem(profilemanager.ID(id)) {
return "", fmt.Errorf("id %q is not valid", id)
}
if !profilemanager.IsValidProfileFilenameStem(profilemanager.ID(id)) {
return "", fmt.Errorf("id %q is not valid", id)
}
if id == profilemanager.DefaultProfileName {
// Android uses netbird.cfg for default profile instead of default.json
// Default profile is stored in root configDir, not in profiles/
return filepath.Join(pm.configDir, defaultConfigFilename), nil

BIN
ui

Binary file not shown.