Commit Graph

22 Commits

Author SHA1 Message Date
GitLab Bot 6046a605fd Add latest changes from gitlab-org/gitlab@master 2020-06-22 12:08:47 +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
Oswaldo Ferreira 44e1915d4f Persist tmp snippet uploads
It persist temporary personal snippets under
user/:id namespaces temporarily while creating
a upload record to track it. If an user gets removed
while it's still a tmp upload, it also gets removed.
If the tmp upload is sent, the upload gets moved to
personal_snippets/:id as before. The upload record
also gets updated to the new model type as well.
2019-06-17 11:25:40 -03:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Tao Wang dc157729b3
i18n: externalize strings from 'app/views/layouts'
Signed-off-by: Tao Wang <twang2218@gmail.com>
2018-07-23 16:33:37 +10:00
Tim Zallmann 423d31a300 Inline script cleanup globals and easy 2017-08-01 08:50:59 +00:00
Jarka Kadlecova 4464c22d6d Support descriptions for snippets 2017-05-31 07:17:03 +02:00
Jarka Kadlecova e4f7b87ddb Support comments for personal snippets 2017-05-05 15:45:49 +02:00
Douwe Maan 5d785457db Clean up overlap between dashboard and explore.
- Split up SnippetsController into separate dashboard and explore sections.
- Use consistent page titles, header titles and sidebars between dashboard and explore sections when signed in or not.
2015-09-08 14:49:20 +01:00
Dmitriy Zaporozhets 0145e8ea21
Set page title based on content in dashboard area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-03 21:53:55 +02:00
Dmitriy Zaporozhets f82c14259b Rebuild navigation for dashboard
* projects from explore page are available from dashboard
* use dashboard sidebar for both logged in and not users
* move explroe projects under projects tab
* move explore groups under groups tab
* move public snippets under snippets tab

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-20 11:59:21 +02:00
Douwe Maan 92fd3ccee0 Add helpers for header title and sidebar, and move setting those from controllers to layouts. 2015-05-01 10:39:16 +02:00
Douwe Maan 26ad250989 Add a page title to every page. 2015-04-30 19:12:15 +02:00
Dmitriy Zaporozhets 4a63573b21 Start applying new layout to snippets pages 2015-04-22 18:17:43 +03:00
Dmitriy Zaporozhets cc5440e82a Use navless layout for snippets page 2013-06-18 17:43:49 +03:00
Dmitriy Zaporozhets 05bc65895c fix layout for snippets 2013-06-08 18:32:00 +03:00
Dmitriy Zaporozhets 4a1b093602 add data-page property to all pages 2013-06-08 17:10:25 +03:00
Dmitriy Zaporozhets e7bcbb95c8 Restyle snippets 2013-06-05 22:25:27 +03:00
Dmitriy Zaporozhets 64457799c5 Fix new snippet tab highlight. Added new entries to changelog 2013-06-05 14:49:48 +03:00
Dmitriy Zaporozhets 213e117a52 Fixed ability and modify UI a bit 2013-06-04 18:50:42 +03:00
Andrew8xx8 9bd1983e16 Search link removed. Will be implemented later 2013-03-25 02:02:08 +04:00
Andrew8xx8 83eb63cbe8 New layout for snippets added 2013-03-25 00:24:34 +04:00