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

Html in text of alert breaks down web ui #524

Open
Jetman80 opened this issue Apr 4, 2022 · 0 comments
Open

Html in text of alert breaks down web ui #524

Jetman80 opened this issue Apr 4, 2022 · 0 comments

Comments

@Jetman80
Copy link

Jetman80 commented Apr 4, 2022

Issue Summary
Today I found my alerta web ui with links to google, like:

After several hours of debugging setup (actually nothing changed and alerta has been running for years here) and source code I found out that one of alerts caused this.

The alert has html components in text field:

select text from alerts where resource = 'needed resource';
CheckHttp CRITICAL: 200, did not find /some text/ in 21661 bytes: <!doctype html><html lang="en" dir="ltr"><head><base href="https://www.google.com/recaptcha/challengepage/"><meta name="referrer" content="origin"><link rel="canonical" href="https://www.google.com/re...

This text have google base something and it breaks down the JS.

I will make workaround from check script side to filter out html, but it would be great if this can be done better way from webui side or api side.

Environment

  • OS: Linux

  • API version: v8.7.0

  • Deployment: self-hosted

  • For self-hosted, WSGI environment: nginx/uwsgi

  • Database: Postgres

  • Server config:
    Auth enabled? Yes
    Auth provider? GitLab
    Customer views? Yes

  • web UI version: v8.7.0

To Reproduce

  1. Create alert with this text in text field:
<!doctype html><html lang="en" dir="ltr"><head><base href="https://www.google.com/recaptcha/challengepage/"><meta name="referrer" content="origin"><link rel="canonical" href="https://www.google.com/re.
  1. Open Web UI and check menu or alert links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant