Commit Graph

11 Commits

Author SHA1 Message Date
GitLab Bot aa0f0e9921 Add latest changes from gitlab-org/gitlab@master 2020-01-16 18:08:46 +00:00
GitLab Bot 08ed6a867b Add latest changes from gitlab-org/gitlab@master 2020-01-16 03:08:47 +00:00
Alessio Caiazza e32069ef6c Process workhorse accelerated wiki uploads
Wiki attachments can be workhorse accelerated.
This commit is backward compatible with older workhorse
2019-09-06 15:53:13 +02:00
Francisco Javier López dde69bfb2a Added list_pages method to avoid loading all wiki pages content
Inside a wiki, when we show the sidebar or browse to the `pages`,
all page contents are retrieved from Gitaly and that is a waste
of resources, since no content from that pages are going to be
showed.

This MR introduces the method `ProjectWiki#list_pages`,
which uses new wiki_list_pages RPC call to retrieve
pages without content

Also in the `WikisController` we're using the method to show
pages in the sidebar and also on the `pages` page.
2019-04-25 04:19:07 +00:00
Robert Schilling 5b29f06611 Only require one parameter when updating a Wiki via the API 2019-02-13 16:35:27 +00:00
Robert Schilling 96a49c79aa API: Support dots in wiki slugs 2019-01-15 09:02:00 +01:00
Imre Farkas b1e070bf49
Fix API::Namespaces to accept namepaces with dots
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
2018-11-28 12:54:11 +01:00
Stan Hu a12d25d8a5 Validate Wiki attachments are valid temporary files
A malicious attacker could craft a request to read arbitrary files on
the system. This change adds a Grape validation to ensure that the
tempfile parameter delivered by the Rack multipart uploader is a
Tempfile type to prevent users from being able to specify arbitrary
filenames.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53072
2018-10-23 20:47:38 -07:00
gfyoung 3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Francisco Javier López f9475e299c Uploads to wiki stored inside the wiki git repository 2018-09-04 10:39:08 +00:00
blackst0ne 2915bb2707 Add API support for wiki pages 2017-09-07 09:21:52 +11:00