gitlab-org--gitlab-foss/app/views/peek/_bar.html.haml
blackst0ne 350e26b8a6 [Rails5] Use safe_params instead of params in url_for helpers
This commits replaces `params` with `safe_params` in `url_for` helpers
to resolve security issues [1] and failing specs with the

```
ArgumentError:
  Attempting to generate a URL from non-sanitized request parameters!
  An attacker can inject malicious data into the generated URL, such as
  changing the host. Whitelist and sanitize passed parameters to be secure.
```

error.

[1]: https://gitlab.com/gitlab-org/gitlab-ce/issues/45168
2018-04-28 21:35:16 +11:00

7 lines
247 B
Text

- return unless peek_enabled?
#js-peek{ data: { env: Peek.env,
request_id: Peek.request_id,
peek_url: peek_routes.results_url,
profile_url: url_for(safe_params.merge(lineprofiler: 'true')) },
class: Peek.env }