diff 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
line wrap: on
line diff
--- a/libervia/server/pages.py	Sat Aug 01 16:47:24 2020 +0200
+++ b/libervia/server/pages.py	Sat Aug 01 16:47:24 2020 +0200
@@ -845,7 +845,7 @@
             if value:
                 try:
                     return jid.JID(value)
-                except RuntimeError:
+                except (RuntimeError, jid.InvalidFormat):
                     log.warning(_("invalid jid argument: {value}").format(value=value))
                     self.pageError(request, C.HTTP_BAD_REQUEST)
             else: