comparison libervia/server/pages.py @ 1317:a7ab4d244982

pages: handle `jid.InvalidFormat` exception in `_filterPathValue`
author Goffi <goffi@goffi.org>
date Sat, 01 Aug 2020 16:47:24 +0200
parents db9ea167c409
children 38875bc292ff
comparison
equal deleted inserted replaced
1316:d0575e9abf7d 1317:a7ab4d244982
843 return "" 843 return ""
844 elif handler in ("jid", "@jid"): 844 elif handler in ("jid", "@jid"):
845 if value: 845 if value:
846 try: 846 try:
847 return jid.JID(value) 847 return jid.JID(value)
848 except RuntimeError: 848 except (RuntimeError, jid.InvalidFormat):
849 log.warning(_("invalid jid argument: {value}").format(value=value)) 849 log.warning(_("invalid jid argument: {value}").format(value=value))
850 self.pageError(request, C.HTTP_BAD_REQUEST) 850 self.pageError(request, C.HTTP_BAD_REQUEST)
851 else: 851 else:
852 return "" 852 return ""
853 else: 853 else: