bugfix sql 注入

This commit is contained in:
UlricQin 2020-12-22 11:56:20 +08:00
parent d355393074
commit 28d311e759
1 changed files with 6 additions and 1 deletions

View File

@ -271,7 +271,12 @@ func v1HostRegister(c *gin.Context) {
oldFields[k] = v
}
uniqValue := f.SN
uniqValue := ""
if f.UniqKey == "sn" {
uniqValue = f.SN
}
if f.UniqKey == "ip" {
uniqValue = f.IP
}