origin-js
origin-js copied to clipboard
🐃 No code to check that review.rating is actually between 1-5
We currently don't check that a review rating coming from IPFS is between 1-5. This would allow an evil reviewer to mess up any future aggregated review rating score for someone by submitting an out of range review.
Good catch. Seems we should add some checks to cap rating between 1-5 in origin-js when writing and reading review data from IPFS.
BTW, what are we deciding on rating value. Is it an integer, one of [1,2,3,4,5] or is it a float between 1.0 and 5.0 ? I'd favor using integer for now to keep things simple. Any objections ?
I'm good with changing it to an integer.