Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Sanity check API parameters #64

Open
michaelkaye opened this issue Aug 3, 2018 · 0 comments
Open

Sanity check API parameters #64

michaelkaye opened this issue Aug 3, 2018 · 0 comments

Comments

@michaelkaye
Copy link

We don't validate that page is >= 0, so we can panic when we attempt to access negative indices in an array.

panic: runtime error: slice bounds out of range

goroutine 61 [running]:
main.RoomMembersJob.Work(0xc4203ae0fe, 0x1e, 0xfffffffffffffffe, 0x14, 0xc420de00c0)
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/job-room-members.go:41 +0x687
main.(*RoomMembersJob).Work(0xc421ae0420, 0xc420de00c0)
:7 +0x72
main.(*Worker).Start(0xc420de00c0)
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/workers.go:38 +0x75
created by main.NewWorker
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/workers.go:88 +0x141

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant