mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	增强加密密钥兼容性
This commit is contained in:
		@@ -34,7 +34,11 @@ func init() {
 | 
			
		||||
		nodeConfig, _ := nodeconfigs.SharedNodeConfig()
 | 
			
		||||
		if nodeConfig != nil {
 | 
			
		||||
			defaultNodeEncryptKey = stringutil.Md5(nodeConfig.NodeId + "@" + nodeConfig.Secret)
 | 
			
		||||
			defaultClusterEncryptKey = stringutil.Md5(nodeConfig.ClusterSecret)
 | 
			
		||||
			if len(nodeConfig.ClusterSecret) == 0 {
 | 
			
		||||
				defaultClusterEncryptKey = defaultNodeEncryptKey
 | 
			
		||||
			} else {
 | 
			
		||||
				defaultClusterEncryptKey = stringutil.Md5(nodeConfig.ClusterSecret)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user