mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 18:57:34 +02:00
The fuzzer found an issue with the issue pattern processor where there is a spurious path.Clean which does not need to be there. This PR also sets the default AppURL for the fuzzer too. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
1 parent
e483ec8b0d
commit
d2d99a25b7
3 files changed
+20
-1
No files matched your search
@@ -5,6 +5,7 @@
|
||||
package markup_test
|
||||
|
||||
import (
|
||||
"io"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -526,3 +527,18 @@ func BenchmarkEmojiPostprocess(b *testing.B) {
|
||||
assert.NoError(b, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFuzz(t *testing.T) {
|
||||
s := "t/l/issues/8#/../../a"
|
||||
renderContext := RenderContext{
|
||||
URLPrefix: "https://example.com/go-gitea/gitea",
|
||||
Metas: map[string]string{
|
||||
"user": "go-gitea",
|
||||
"repo": "gitea",
|
||||
},
|
||||
}
|
||||
|
||||
err := PostProcess(&renderContext, strings.NewReader(s), io.Discard)
|
||||
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
Reference in new issue
Block a user