fix(utf8): закрыть lossy-границы конфигурации и API
This commit is contained in:
@@ -189,6 +189,10 @@ func ImportPeer(c *gin.Context) {
|
||||
vo.Fail("the file is too big", c)
|
||||
return
|
||||
}
|
||||
if err = validateStrictJSONEncoding(content); err != nil {
|
||||
vo.Fail("content contains invalid UTF-8 or UTF-16", c)
|
||||
return
|
||||
}
|
||||
|
||||
var peerExports []bo.PeerExport
|
||||
decoder := json.NewDecoder(bytes.NewReader(content))
|
||||
|
||||
Reference in New Issue
Block a user