jrief / django-websocket-redis

Websockets for Django applications using Redis as message queue
http://django-websocket-redis.awesto.com/
MIT License
895 stars 222 forks source link

Fix out-of-bounds error #281

Open steffann opened 6 years ago

steffann commented 6 years ago

When checking len(value) >= 2 only value[1] is guaranteed to exist

jrief commented 6 years ago

what does the value-tuple actually contain? Wouldn't it be safer to check for if len(value) > 2?

steffann commented 6 years ago

I don't know what it's supposed to contain. I assumed you would know :) It's not a code path I am actually using. I just noticed the discrepancy.