[bug] fatal error: concurrent map iteration and map write
Closed this issue · 1 comments
dwisiswant0 commented
Describe the bug
teler-proxy_1 | fatal error: concurrent map iteration and map write
dvwa_1 | 192.168.80.4 - - [01/Aug/2023:07:44:37 +0000] "GET / HTTP/1.1" 200 2811 "-" "Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36"
dvwa_1 | 192.168.80.4 - - [01/Aug/2023:07:44:37 +0000] "GET /favicon.ico HTTP/1.1" 200 1651 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36"
teler-proxy_1 |
teler-proxy_1 | goroutine 63 [running]:
teler-proxy_1 | github.com/samber/lo.Assign[...]({0xc000a497c8?, 0x2, 0x7})
teler-proxy_1 | /go/pkg/mod/github.com/samber/lo@v1.38.1/map.go:169 +0xc5
teler-proxy_1 | github.com/kitabisa/teler-waf/dsl.(*Env).Run(0xc000282380, 0xc000cda570?)
teler-proxy_1 | /go/pkg/mod/github.com/kitabisa/teler-waf@v1.0.4/dsl/run.go:33 +0x34e
teler-proxy_1 | github.com/kitabisa/teler-waf.(*Teler).isDSLProgramTrue(...)
teler-proxy_1 | /go/pkg/mod/github.com/kitabisa/teler-waf@v1.0.4/utils.go:212
teler-proxy_1 | github.com/kitabisa/teler-waf.(*Teler).checkCommonWebAttack(0xc000cab180, 0xc0005aa150?)
teler-proxy_1 | /go/pkg/mod/github.com/kitabisa/teler-waf@v1.0.4/analyze.go:228 +0x175
teler-proxy_1 | github.com/kitabisa/teler-waf.(*Teler).analyzeRequest(0xc000cab180, {0x0?, 0x506d49?}, 0x0?)
teler-proxy_1 | /go/pkg/mod/github.com/kitabisa/teler-waf@v1.0.4/analyze.go:88 +0x197
teler-proxy_1 | github.com/kitabisa/teler-waf.(*Teler).HandlerFuncWithNext(0x410c9f?, {0x14b6928, 0xc0017fe1c0}, 0x0?, 0xc000a49aa8)
teler-proxy_1 | /go/pkg/mod/github.com/kitabisa/teler-waf@v1.0.4/handler.go:47 +0x36
teler-proxy_1 | github.com/kitabisa/teler-proxy/pkg/tunnel.(*Tunnel).ServeHTTP(0x0?, {0x14b6928?, 0xc0017fe1c0?}, 0x46882e?)
teler-proxy_1 | /app/pkg/tunnel/tunnel.go:61 +0x46
teler-proxy_1 | net/http.serverHandler.ServeHTTP({0xc000c22420?}, {0x14b6928, 0xc0017fe1c0}, 0xc0017f2400)
teler-proxy_1 | /usr/local/go/src/net/http/server.go:2947 +0x30c
teler-proxy_1 | net/http.(*conn).serve(0xc00033ce60, {0x14b7450, 0xc0007a8a80})
teler-proxy_1 | /usr/local/go/src/net/http/server.go:1991 +0x607
teler-proxy_1 | created by net/http.(*Server).Serve
teler-proxy_1 | /usr/local/go/src/net/http/server.go:3102 +0x4db
To Reproduce
Steps to reproduce the behavior:
Your teler usage & options...
teler WAF configuration:
# your teler WAF configuration...
// or in JSON format...
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: [e.g. mac, linux]
- OS version: [uname -a]
- teler Proxy version: [teler-proxy -V]
Additional context
Add any other context about the problem here. Full output log is probably a helpful thing to add here.
dwisiswant0 commented
Looks like it was introduced in this commit: teler-sh/teler-waf@6c6302f#diff-b41a931290abf449be83f8bcee0f9e44d5cc3f12a44580a896e23ca537f9a937R33.