Parcourir la source

Fix: ensure non-blank default value for ClientVersion in handshake

Rod Hynes il y a 11 ans
Parent
commit
ca85ff7900
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      psiphon/config.go

+ 4 - 0
psiphon/config.go

@@ -89,6 +89,10 @@ func LoadConfig(configJson []byte) (*Config, error) {
 		}
 		}
 	}
 	}
 
 
+	if config.ClientVersion == "" {
+		config.ClientVersion = "0"
+	}
+
 	if config.ConnectionWorkerPoolSize == 0 {
 	if config.ConnectionWorkerPoolSize == 0 {
 		config.ConnectionWorkerPoolSize = CONNECTION_WORKER_POOL_SIZE
 		config.ConnectionWorkerPoolSize = CONNECTION_WORKER_POOL_SIZE
 	}
 	}