Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-30Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2022-10-19Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2021-06-23Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2021-03-16Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-08-17Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-06-24Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2020-05-26Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-11-01Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-10-23Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-10-09Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-07-29Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher
2019-07-29Fix whitespace in wiki link filtering specsYorick Peterse
This ensures this spec is the same in both CE and EE.
2019-07-26Extract SanitizeNodeLink and apply to WikiLinkFilterKerri Miller
The SanitizationFilter was running before the WikiFilter. Since WikiFilter can modify links, we could see links that _should_ be stopped by SanatizationFilter being rendered on the page. I (kerrizor) had previously addressed the bug in: https://gitlab.com/gitlab-org/gitlab-ee/commit/7bc971915bbeadb950bb0e1f13510bf3038229a4 However, an additional exploit was discovered after that was merged. Working through the issue, we couldn't simply shuffle the order of filters, due to some implicit assumptions about the order of filters, so instead we've extracted the logic that sanitizes a Nokogiri-generated Node object, and applied it to the WikiLinkFilter as well. On moving filters around: Once we start moving around filters, we get cascading failures; fix one, another one crops up. Many of the existing filters in the WikiPipeline chain seem to assume that other filters have already done their work, and thus operate on a "transform anything that's left" basis; WikiFilter, for instance, assumes any link it finds in the markdown should be prepended with the wiki_base_path.. but if it does that, it also turns `href="@user"` into `href="/path/to/wiki/@user"`, which the UserReferenceFilter doesn't see as a user reference it needs to transform into a user profile link. This is true for all the reference filters in the WikiPipeline.
2019-07-26Add frozen_string_literal to spec/lib (part 1)Thong Kuah
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-05-24Reject slug+uri concat if slug is deemed unsafeKerri Miller
First reported: https://gitlab.com/gitlab-org/gitlab-ce/issues/60143 When the page slug is "javascript:" and we attempt to link to a relative path (using `.` or `..`) the code will concatenate the slug and the uri. This MR adds a guard to that concat step that will return `nil` if the incoming slug matches against any of the "unsafe" slug regexes; currently this is only for the slug "javascript:" but can be extended if needed. Manually tested against a non-exhaustive list from OWASP of common javascript XSS exploits that have to to with mangling the "javascript:" method, and all are caught by this change or by existing code that ingests the user-specified slug.
2018-09-04Uploads to wiki stored inside the wiki git repositoryFrancisco Javier López
2018-01-16Fix links to uploaded files on wiki pagesNick Thomas
2017-08-03Change all `:empty_project` to `:project`Robert Speicher
2017-07-27Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable
services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-18Fix bug in `WikiLinkFilter`.Timothy Andrew
1. An exception would be raised if the filter was called with an invalid URI. Mainly because we weren't catching the `Addressable` exception. 2. This commit fixes it and adds a spec for the filter.
2016-06-09Implement the correct linking behaviour in `WikiLinkFilter`.Timothy Andrew
Original Comments ================= - Linking behaves as per rules documented here: https://gitlab.com/gitlab-org/gitlab-ce/blob/16568-document-wiki-linking-behavior/doc/markdown/wiki.md - All links (to other wiki pages) are rewritten to be at the level of the app root. We can't use links relative to the current page ('./foo', 'foo', '../foo'), because they won't work in the markdown preview, where the current page is suffixed with `/edit` - Move existing `WikiLinkFilter` specs to `WikiPipeline` spec. It makes sense to run these tests on the combined output of the pipeline, rather than a single filter, since we can catch issues with conflicting filters. - Add more tests to cover the new linking @rymai's Review =============== - Classes nested under `WikiLinkFilter` should declare `WikiLinkFilter`'s inherit, so nothing changes if the nested class is loaded first. - Add a blank line after a guard clause - Use keyword arguments for the `Rewriter` constructor - Invert a condition - use `if` instead of `unless` - Inline a `let` in `WikiPipeline` spec - it was only used in a single place - Change out of date spec names - Add a comment for every rewrite rule in `Rewriter`
2016-05-12Implement @rymai's feedback after review.Timothy Andrew
- Separate 'exercise' and 'verify' steps of tests. - Use `build_stubbed` instead of `build`
2016-05-12Add a spec for `WikiLinkFilter`Timothy Andrew
- And fix behavior for non-file hierarchical links.