Mercurial > moin > 1.9
changeset 5981:3460b27e7f3e
AttachFile do=get and do=view: send 404 status if file does not exist
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sat, 06 Apr 2013 22:47:36 +0200 |
parents | 6489ec33874d |
children | 897111701cf8 |
files | MoinMoin/action/AttachFile.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py Sat Apr 06 00:21:51 2013 +0200 +++ b/MoinMoin/action/AttachFile.py Sat Apr 06 22:47:36 2013 +0200 @@ -865,6 +865,7 @@ if not request.user.may.read(pagename): return _('You are not allowed to get attachments from this page.') if not filename: + request.status_code = 404 return # error msg already sent in _access_file timestamp = datetime.datetime.fromtimestamp(os.path.getmtime(fpath)) @@ -1139,6 +1140,7 @@ if not request.user.may.read(pagename): return _('You are not allowed to view attachments of this page.') if not filename: + request.status_code = 404 return request.formatter.page = Page(request, pagename)