Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search leading to Internal Error #2256

Closed
keithdanielll opened this issue Mar 15, 2023 · 2 comments
Closed

Search leading to Internal Error #2256

keithdanielll opened this issue Mar 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@keithdanielll
Copy link

Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG

Take any of the top rated public instances and insert this search:
WARNING: /plugins/Live/VisitorProfile.php(24): Deprecated - Creation of dynamic property Piwik\Plugins\Live\VisitorProfile::$idSite is deprecated - Matomo 4.13.3

... will result in "internal server error"

Expected behavior

Some search result, or masking of "forbidden" characters

@keithdanielll keithdanielll added the bug Something isn't working label Mar 15, 2023
@keithdanielll
Copy link
Author

Seems to be related

@Solirs
Copy link
Contributor

Solirs commented Mar 15, 2023

I found a way to patch this by running re.escape() on the query inside of the problematic function call.
content = re.sub(regex_highlight_cjk(q), f'<span class="highlight">{re.escape(q)}</span>', content)
It fixes it for both your issue and the other one so i'll PR it.

return42 pushed a commit to Solirs/searxng that referenced this issue Mar 17, 2023
dalf pushed a commit to dalf/searxng that referenced this issue Mar 17, 2023
dalf pushed a commit to dalf/searxng that referenced this issue Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants