Skip to content

Commit

Permalink
Stops a potential DoS by limiting maximum count to
Browse files Browse the repository at this point in the history
2016 or less. This way, you're not having memory exhausted by someone trying to load information on all of your blocks.
  • Loading branch information
Lvl4Sword authored and Maffelux committed Nov 18, 2017
1 parent 283ab79 commit 440c5f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Abe/abe.py
Expand Up @@ -416,6 +416,8 @@ def handle_chain(abe, page):
body += abe.search_form(page) body += abe.search_form(page)


count = get_int_param(page, 'count') or 20 count = get_int_param(page, 'count') or 20
if count >= 2017:
count = 20
hi = get_int_param(page, 'hi') hi = get_int_param(page, 'hi')
orig_hi = hi orig_hi = hi


Expand Down

0 comments on commit 440c5f3

Please sign in to comment.