Skip to content

Improve slash command stripping, escape temporary note contents

What does this MR do?

Related EE MR https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1900

Fixes two bugs around Instant comments that were introduced in %9.2 with https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10760

  • Comment contents shown as temporary note is vulnerable to XSS (writing <script>alert('Boom!');</script> is not escaped).
  • Slash command stripping should also include parameters provided to slash command.

Why was this MR needed?

This MR fixes regression around Instant comments feature as mentioned above.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #32016 (closed)

Merge request reports