Mercurial > libervia-pubsub
diff src/backend.py @ 377:ded7657b03fa
backend: send a BadRequest if RSM max is negative
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 10 Jan 2019 08:42:49 +0100 |
parents | 9a787881b824 |
children | e81964db3cd6 |
line wrap: on
line diff
--- a/src/backend.py Sun Jan 06 17:30:04 2019 +0100 +++ b/src/backend.py Thu Jan 10 08:42:49 2019 +0100 @@ -1659,6 +1659,8 @@ def items(self, request): ext_data = {} if const.FLAG_ENABLE_RSM and request.rsm is not None: + if request.rsm.max < 0: + raise pubsub.BadRequest(text="max can't be negative") ext_data['rsm'] = request.rsm try: ext_data['pep'] = request.delegated