Markus Heiser
540323a4b0
[mod] hardening xpath engine: ignore empty results
...
A SearXNG maintainer on Matrix reported a traceback::
File "searxng-src/searx/engines/xpath.py", line 272, in response
dom = html.fromstring(resp.text)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "searx-pyenv/lib/python3.11/site-packages/lxml/html/__init__.py", line 850, in fromstring
doc = document_fromstring(html, parser=parser, base_url=base_url, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "searx-pyenv/lib/python3.11/site-packages/lxml/html/__init__.py", line 738, in document_fromstring
raise etree.ParserError(
lxml.etree.ParserError: Document is empty
I don't have an example to reproduce the issue, but the issue and this patch are
clearly recognizable even without an example.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-29 14:20:31 +01:00
..
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-06-15 15:42:29 +02:00
2024-11-24 11:56:12 +01:00
2024-03-11 14:55:38 +01:00
2024-07-14 17:57:58 +02:00
2024-11-01 12:49:33 +01:00
2024-05-16 07:30:38 +02:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2024-05-16 07:30:38 +02:00
2024-11-24 12:41:57 +01:00
2024-09-06 07:13:47 +02:00
2024-09-26 07:26:51 +02:00
2024-06-25 11:12:41 +02:00
2024-03-11 14:55:38 +01:00
2024-11-24 12:41:57 +01:00
2024-05-16 07:30:38 +02:00
2024-10-03 07:10:53 +02:00
2024-06-15 15:42:29 +02:00
2024-09-15 15:19:51 +02:00
2024-04-28 08:42:18 +02:00
2024-05-12 18:36:49 +02:00
2024-09-23 07:02:10 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-05-17 16:37:39 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-04-26 07:33:28 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-04-26 07:33:28 +02:00
2024-06-15 15:42:29 +02:00
2024-07-27 09:21:40 +02:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-04-27 18:11:33 +02:00
2024-11-25 17:00:52 +01:00
2024-03-11 14:55:38 +01:00
2024-11-25 17:00:52 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-06-20 06:30:00 +02:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2024-11-27 11:08:23 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-09 08:15:50 +01:00
2021-12-27 09:26:22 +01:00
2024-03-11 14:55:38 +01:00
2024-07-28 19:00:51 +02:00
2024-05-16 07:30:38 +02:00
2024-10-14 14:39:11 +02:00
2024-05-16 07:30:38 +02:00
2024-09-15 08:04:21 +02:00
2024-05-16 07:30:38 +02:00
2024-06-16 16:45:03 +02:00
2024-05-16 07:30:38 +02:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-10-03 07:10:53 +02:00
2024-11-27 13:49:45 +01:00
2024-10-15 14:29:10 +02:00
2024-05-28 11:55:59 +02:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2022-01-28 22:33:41 +01:00
2024-07-27 11:49:58 +02:00
2022-05-07 18:23:10 +02:00
2024-11-28 09:53:21 +01:00
2024-06-15 15:42:29 +02:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-06-30 16:18:33 +02:00
2024-04-26 07:33:28 +02:00
2024-03-11 14:55:38 +01:00
2024-11-26 09:36:59 +01:00
2024-10-03 13:04:06 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-07-03 10:24:03 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2024-10-15 06:37:01 +02:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2024-06-15 11:33:09 +02:00
2024-03-11 14:55:38 +01:00
2024-07-15 06:58:39 +02:00
2024-04-10 06:51:28 +02:00
2024-10-03 13:04:06 +02:00
2024-03-11 14:55:38 +01:00
2024-06-15 15:42:29 +02:00
2024-03-11 14:55:38 +01:00
2024-04-07 19:02:53 +02:00
2024-10-15 13:06:00 +02:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2022-01-07 14:14:31 +01:00
2024-05-16 07:30:38 +02:00
2024-07-27 11:49:58 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-07-27 11:49:58 +02:00
2024-06-15 15:42:29 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-10-03 13:04:06 +02:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-10-03 07:10:53 +02:00
2024-09-15 12:48:35 +02:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-06-15 15:42:29 +02:00
2024-03-11 14:55:38 +01:00
2024-05-16 07:30:38 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-10-03 13:04:06 +02:00
2024-03-11 14:55:38 +01:00
2024-11-24 12:41:57 +01:00
2024-09-29 14:29:22 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-11-24 12:41:57 +01:00
2024-06-15 15:42:29 +02:00
2024-03-11 14:55:38 +01:00
2024-06-15 15:42:29 +02:00
2024-04-26 07:33:28 +02:00
2024-03-11 14:55:38 +01:00
2024-05-29 17:56:17 +02:00
2024-11-24 12:41:57 +01:00
2024-03-11 14:55:38 +01:00
2024-11-28 06:05:45 +01:00
2024-05-10 16:04:27 +02:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-11-26 10:06:07 +01:00
2024-03-11 14:55:38 +01:00
2024-03-11 14:55:38 +01:00
2024-11-29 14:20:31 +01:00
2024-07-20 09:59:43 +02:00
2024-05-16 07:30:38 +02:00
2024-09-03 22:26:59 +02:00
2024-03-11 14:55:38 +01:00
2024-08-21 12:08:35 +02:00
2024-09-12 00:04:04 +02:00
2024-04-13 08:41:00 +02:00
2024-05-29 17:56:17 +02:00
2024-05-16 07:30:38 +02:00
2024-06-25 14:40:19 +02:00