Skip to content

EE - Improve slash command stripping, escape temporary note contents

What does this MR do?

This MR is an EE port of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11341

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.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/32016

Merge request reports