Commit Graph

5 Commits

Author SHA1 Message Date
GitLab Bot 08931747cc Add latest changes from gitlab-org/gitlab@master 2020-11-26 18:09:18 +00:00
Stan Hu 5fbbd3dd6e
Add support for Content-Security-Policy
A nonce-based Content-Security-Policy thwarts XSS attacks by allowing
inline JavaScript to execute if the script nonce matches the header
value. Rails 5.2 supports nonce-based Content-Security-Policy headers,
so provide configuration to enable this and make it work.

To support this, we need to change all `:javascript` HAML filters to the
following form:

```
= javascript_tag nonce: true do
  :plain
    ...
```

We use `%script` throughout our HAML to store JSON and other text, but
since this doesn't execute, browsers don't appear to block this content
from being used and require the nonce value to be present.
2019-08-07 12:37:31 +10:00
Tim Zallmann 423d31a300 Inline script cleanup globals and easy 2017-08-01 08:50:59 +00:00
Dmitriy Zaporozhets 17f664866b Fix google analytics setting being ignored 2013-05-24 23:17:07 +03:00
Dmitriy Zaporozhets 7069fac317 Add custom sing-in text & google analytics 2013-05-08 21:03:36 +03:00