Skip to content
Snippets Groups Projects
Commit 5079b968 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Limit the limit we will consider

Thanks, Hypothesis.
parent 24e237f1
No related branches found
No related tags found
1 merge request!59Unblinded token web interface
......@@ -20,6 +20,9 @@ vouchers for fresh tokens.
In the future it should also allow users to read statistics about token usage.
"""
from sys import (
maxint,
)
from itertools import (
islice,
)
......@@ -139,7 +142,7 @@ class _UnblindedTokenCollection(Resource):
limit = request.args.get(b"limit", [None])[0]
if limit is not None:
limit = int(limit)
limit = min(maxint, int(limit))
position = request.args.get(b"position", [b""])[0].decode("utf-8")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment