Merge "Security fix for possible private paste bruteforcing"
This commit is contained in:
commit
0939be787c
@ -87,7 +87,8 @@ class PasteController(object):
|
|||||||
"""Show an existing paste."""
|
"""Show an existing paste."""
|
||||||
linenos = local.request.args.get('linenos') != 'no'
|
linenos = local.request.args.get('linenos') != 'no'
|
||||||
paste = Paste.get(identifier)
|
paste = Paste.get(identifier)
|
||||||
if paste is None:
|
|
||||||
|
if (paste is None) or (paste.private and identifier.isdigit()):
|
||||||
raise NotFound()
|
raise NotFound()
|
||||||
if raw:
|
if raw:
|
||||||
return Response(paste.code, mimetype='text/plain; charset=utf-8')
|
return Response(paste.code, mimetype='text/plain; charset=utf-8')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user