mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-13 20:26:01 +00:00
Address some CodeQL security concerns (#35572)
Although there is no real security problem
This commit is contained in:
@@ -69,3 +69,8 @@ func TestAccessLogger(t *testing.T) {
|
||||
recorder.record(time.Date(2000, 1, 2, 3, 4, 5, 0, time.UTC), &testAccessLoggerResponseWriterMock{}, req)
|
||||
assert.Equal(t, []string{`remote-addr - - [02/Jan/2000:03:04:05 +0000] "GET /path https" 200 123123 "referer" "user-agent"`}, mockLogger.logs)
|
||||
}
|
||||
|
||||
func TestAccessLoggerRequestID(t *testing.T) {
|
||||
assert.False(t, isSafeRequestID("\x00"))
|
||||
assert.True(t, isSafeRequestID("a b-c"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user