forked from kevin/meshtastic_mqtt_server
安全加固:console_log.meshtastic 默认关闭(不打印解密明文),session_secure 默认 true,config.yaml 回写权限改 0600,公开接口错误信息脱敏(/api/health、/api/channels、列表接口,text-messages 移除 mqtt_remote_host),bot PSK 不回显(psk_set+更新保持原值),前端 help 页 DOMPurify 客户端消毒,后端 v1.6.0
This commit is contained in:
@@ -116,6 +116,11 @@ func (s *Store) UpdateBotNode(id uint64, input BotNodeInput) (*BotNodeRecord, er
|
||||
preserved := existing.NodeNum
|
||||
input.NodeNum = &preserved
|
||||
}
|
||||
// PSK 不回显给前端后,更新表单不会携带原值;为空时保持现有 PSK,
|
||||
// 避免用户只是改个名字就把频道密钥重置为默认 AQ==。
|
||||
if strings.TrimSpace(input.PSK) == "" {
|
||||
input.PSK = existing.PSK
|
||||
}
|
||||
row, err := s.normalizedBotNodeRecord(input)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user