mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
server: quote method in logs, fix CodeQL warnings
CWE-117: Log entries created from user input If unsanitized user input is written to a log entry, a malicious user may be able to forge new log entries.
This commit is contained in:
parent
0a338ea94b
commit
9d5b8d606a
2 changed files with 18 additions and 1 deletions
|
@ -2569,6 +2569,11 @@ func checkNep17TransfersAux(t *testing.T, e *executor, acc interface{}, sent, rc
|
|||
require.Equal(t, arr, res.Received)
|
||||
}
|
||||
|
||||
func TestEscapeForLog(t *testing.T) {
|
||||
in := "\n\tbad"
|
||||
require.Equal(t, "bad", escapeForLog(in))
|
||||
}
|
||||
|
||||
func BenchmarkHandleIn(b *testing.B) {
|
||||
chain, orc, cfg, logger := getUnitTestChain(b, false, false)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue