govalidator icon indicating copy to clipboard operation
govalidator copied to clipboard

The govalidator does not support multi-goroutines, multi-goroutines insecurity?

Open wpecker opened this issue 7 years ago • 2 comments

fatal error: concurrent map read and map write

goroutine 2399752 [running]: runtime.throw(0xb2bbd7, 0x21) /mnt/shared/go/src/runtime/panic.go:605 +0x95 fp=0xc60cb5c3c0 sp=0xc60cb5c3a0 pc=0x42d1f5 runtime.mapaccess2_faststr(0xa7d800, 0xc4201b3da0, 0xa124ec, 0x8, 0x0, 0x0) /mnt/shared/go/src/runtime/hashmap_fast.go:324 +0x47a fp=0xc60cb5c418 sp=0xc60cb5c3c0 pc=0x40dbaa innotechx.com/net-copycat-audit/vendor/github.com/asaskevich/govalidator.typeCheck(0xa4a9e0, 0xc677028170, 0x98, 0xa124dc, 0x7, 0x0, 0x0, 0x14eda60, 0xa4a9e0, 0xa124e5, ...) /mnt/shared/go-T/src/innotechx.com/net-copycat-audit/vendor/github.com/asaskevich/govalidator/validator.go:1014 +0x15ff fp=0xc60cb5cc58 sp=0xc60cb5c418 pc=0x84924f innotechx.com/net-copycat-audit/vendor/github.com/asaskevich/govalidator.ValidateStruct(0xab5740, 0xc677028150, 0xab5740, 0xc677028150, 0xc4201198c0) /mnt/shared/go-T/src/innotechx.com/net-copycat-audit/vendor/github.com/asaskevich/govalidator/validator.go:688 +0x34c fp=0xc60cb5d008 sp=0xc60cb5cc58 pc=0x84618c

	ok, err := govalidator.ValidateStruct(req)
	if err != nil || !ok {
         ...
        }

wpecker avatar Dec 04 '17 05:12 wpecker

Why does this got close without any comment ? I have got the same issue with TagMap

tuan-lm97 avatar Aug 27 '21 08:08 tuan-lm97

Hello guys! I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back Link to my repo: create issue there and we'll discuss it.

sergeyglazyrindev avatar Oct 17 '21 21:10 sergeyglazyrindev