Skip to content

[Bug]: Frontend Crashes when clicking News #2178

Description

@JavaIsPain

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Clicking News loads the News Page only for two Frames before the entire Frontend crashes.
The crash can be resolved temporarily by navigating to a non-news page and reloading the page.

Before:
Image

During First Frame:
Image

Second Frame:
Image

Right afterwards the crash:
Image

Expected Behavior

Dont crash.

Steps to reproduce

Deploy the multi variance of the latest ce docker image.
Click News.

Environment

Firefox, but the issue should be the same everywhere in theory.

Additional Information

Currently in
/src/pages/ApplicationV2/NewsLayout.tsx

This is the section with the issue:
<span dangerouslySetInnerHTML={{ __html: c.body.replace(/\r\n/g, "<br />") }} />

I presume this can be solved with something like

<span dangerouslySetInnerHTML={{ 
  __html: c.body ? c.body.replace(/\r\n/g, "<br />") : "No description available" 
}} />

There might also be an XSS Vulnerability in there in theory. Could DOMPurify.sanitize that while at it anyway no?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions