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
2019-09-18Add latest changes from gitlab-org/gitlab@12-3-auto-deploy-20190916stable-branch-foss-testGitLab Bot
2019-09-16Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-05Set asset_proxy_whitelist default to gitlab hostBrett Walker
2019-09-03Merge branch '66741-remove-spec-rails_helper-rb' into 'master'Grzegorz Bizon
Remove spec/rails_helper.rb Closes #66741 See merge request gitlab-org/gitlab-ce!32380
2019-09-02Fix upload URLs in MarkdownHeinrich Lee Yu
Fixes RelativeLinkFilter for users that don't have access to the project's repository
2019-08-30Fix for #56295, https://gitlab.com/gitlab-org/gitlab-ce/issues/56295.Jesse Hall
All avatars now visible in commit trailers.
2019-08-30Resolve "Use "moved" instead of "closed" in issue references"Juliette de Rancourt
2019-08-30Replace rails_helper.rb with spec_helper.rbAsh McKenzie
rails_helper.rb's only logic was to require spec_helper.rb.
2019-08-30Merge branch 'security-enable-image-proxy' into 'master'GitLab Release Tools Bot
Use image proxy to mitigate stealing ip addresses Closes #2812 See merge request gitlab/gitlabhq!2926
2019-08-30Merge branch 'security-61974-limit-issue-comment-size' into 'master'GitLab Release Tools Bot
Limit the size of issuable description and comments See merge request gitlab/gitlabhq!3267
2019-08-30Merge branch 'security-fix-markdown-xss' into 'master'GitLab Release Tools Bot
Re-escape the whole HTML content when finding HTML references See merge request gitlab/gitlabhq!3340
2019-08-24Add support for using a Camo proxy serverBrett Walker
User images and videos will get proxied through the Camo server in order to keep malicious sites from collecting the IP address of users.
2019-08-23Re-escape whole HTML content instead of only matchJan Provaznik
When we un-escape HTML text to find references in it, we should then re-escape the whole text again, not only found matches. Because we replace matches with milestone/label links (which contain HTML tags we don't want to escape again), we re-escape HTML text with placeholders instead of these links and then replace placeholders in the escaped text.
2019-08-22Limit the size of issuable description and commentsAlexandru Croitor
Limiting the size of issuable description and comments to 1_000_000, which is close to ~1MB of ASCII characters, which represents 99.9% of all descriptions and comments we have in DB at the moment. This should help prevent DoS attacks when comments contain refference strings. Also this change updates regexp matching the namespaces paths by limiting the namespaces paths to Namespace::NUMBER_OF_ANCESTORS_ALLOWED, as we allow 20 levels deep groups. see https://gitlab.com/gitlab-org/gitlab-ce/issues/61974#note_191274234
2019-08-21Avoid exposing unaccessible repo data upon GFM processingOswaldo Ferreira
When post-processing relative links to absolute links RelativeLinkFilter didn't take into consideration that internal repository data could be exposed for users that do not have repository access to the project. This commit solves that by checking whether the user can `download_code` at this repository, avoiding any processing of this filter if the user can't. Additionally, if we're processing for a group ( no project was given), we check if the user can read it in order to expand the href as an extra. That doesn't seem necessarily a breach now, but an extra check doesn't hurt as after all the user needs to be able to `read_group`.
2019-08-16Support query parameters in metrics embedsSarah Yasonik
https://gitlab.com/gitlab-org/gitlab-ce/issues/62971 Adds support for embedding specific charts from the metrics dashboard. Expected parameters are dashboard, title, group, and y_label.
2019-08-09Remove gfm_embed_metrics flag from BETristan Read
Removes the feature flag that controls whether metrics dashboard urls unfurl the metrics dashboard charts.
2019-08-07Initial commit of WIP code for considerationKerri Miller
Squash this commit and reword before merging..
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-26Merge branch 'frozen_string_spec_lib' into 'master'Stan Hu
Add frozen_string_literal to spec/lib (part 1) See merge request gitlab-org/gitlab-ce!31130
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-26Fix cannot modify frozen stringThong Kuah
Note that Performance/UnfreezeString recommends unary plus over "".dup, but unary plus has lower precedence so we have to use parenthesis
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-07-25Remove code related to object hierarchy in MySQLHeinrich Lee Yu
These are not required because MySQL is not supported anymore
2019-07-16Rename Redactor classes to ReferenceRedactorSarah Yasonik
2019-07-16Simplify factories for servicesJarka Košanová
- use predefined factories when creating projects with services - remove unnecessary arguments
2019-07-11Merge branch 'banzai-avoid-redis-if-db-cache' into 'master'Douwe Maan
Banzai - avoid redis if attr is in DB cache See merge request gitlab-org/gitlab-ce!30334
2019-07-11Banzai - avoid redis if attr is in DB cacheMario de la Ossa
When cache_collection_render runs we end up reading and writing things to redis even if we already have the rendered field cached in the DB. This commit avoids using redis at all whenever we have the field already rendered in the DB cache.
2019-07-10Expose metrics element for FE consumptionSarah Yasonik
Adds GFM Pipline filters to insert a placeholder in the generated HTML from GFM based on the presence of a metrics dashboard link. The front end should look for the class 'js-render-metrics' to determine if it should replace the element with metrics charts. The data element 'data-dashboard-url' should be the endpoint the front end should hit in order to obtain a dashboard layout in order to appropriately render the charts.
2019-07-02Merge branch 'security-DOS_issue_comments_banzai' into 'master'Marin Jankovski
Fix DOS when rendering issue/MR comments See merge request gitlab/gitlabhq!3152
2019-06-20Do not rewrite relative links for system notesMario de la Ossa
2019-06-14Fix DOS when rendering issue/MR commentsMario de la Ossa
2019-06-07Allow emoji in label and milestone referencesSean McGivern
If we put the emoji filter before the reference filters, each emoji will have a wrapper element that prevents the reference filter from detecting the presence of the emoji. As the emoji filter now runs after the reference filters, references must contain a literal emoji, not the GitLab Flavored Markdown versions (:100`, for example). A weird side-effect is that if you have a label with the 100 emoji, and a label named :100:, then trying to reference the latter will work (link to the correct label), but will render with the 100 emoji. I'm comfortable with that edge case, I think.
2019-06-06Merge branch 'fix/allow-lower-case-issue-ids' into 'master'Sean McGivern
Allow lowercase prefix for Youtrack issue ids Closes #62661 See merge request gitlab-org/gitlab-ce!29057
2019-06-05Use Redis for CacheMarkDownField on non AR modelsPatrick Bajao
This allows using `CacheMarkdownField` for models that are not backed by ActiveRecord. When the including class inherits `ActiveRecord::Base` we include `Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the markdown fields to be rendered and the generated HTML stored in a `<field>_html` attribute on the record. We also store the version used for generating the markdown. All other classes that include this model will include the `Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html` attributes to that model and will generate the html in them. The generated HTML will be cached in redis under the key `markdown_cache:<class>:<id>`. The class this included in must therefore respond to `id`.
2019-06-03Merge branch 'security-60143-address-xss-issue-master' into 'master'Robert Speicher
Reject slug+uri concat if slug is deemed unsafe See merge request gitlab/gitlabhq!3108
2019-06-03Allow lowercase prefix for Youtrack issue idsMatthias Baur
Relates to #42595. Fixes #62661.
2019-06-03Merge branch 'security-fix-project-existence-disclosure-master' into 'master'GitLab Release Tools Bot
Fix url redaction for issue links See merge request gitlab/gitlabhq!3091
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.
2019-05-24Fix milestone references with HTML entities in the nameSean McGivern
When a milestone name contained an HTML entity that would be escaped (&, <, >), then it wasn't possible to refer to this milestone by name, or use it in a quick action. This already worked for labels, but not for milestones. We take care to re-escape un-matched milestones, too.
2019-05-20Fix typos in the whole gitlab-ce projectYoginth
2019-05-06Merge branch 'patch-49' into 'master'Sean McGivern
No leading/trailing spaces when generating heading ids (Fixes #57528) Closes #57528 See merge request gitlab-org/gitlab-ce!27025
2019-05-03Fix url redaction for issue linksPatrick Derichs
Add changelog entry Add missing href to all redactor specs and removed href assignment Remove obsolete spec If original_content is given, it should be used for link content
2019-04-11Use strip to remove leading/trailing spacesWillian Balmant
Change based on comments in MR #27025
2019-04-10No leading/trailing spaces when generating heading ids (Fixes #57528)Willian Balmant
Update based on comments in MR #27025
2019-04-10Remove multi-line suggestions feature flagOswaldo Ferreira
That's a straightforward feature flag code removal for 11.10
2019-04-05Merge branch '58717-checkbox-cannot-be-checked-if-a-blockquote-is-above' ↵Sean McGivern
into 'master' Checkbox cannot be checked if preceded by a blockquote Closes #58717 See merge request gitlab-org/gitlab-ce!26937
2019-04-05Autocorrect with RSpec/ExampleWording copThong Kuah
- rewords examples starting with 'should' - rewords examples starting with 'it' Note: I had to manually fixup "onlies" to "only"
2019-04-05Fenced blockquotes to not change source line posBrett Walker
Replaces blockquote fences with \n, keeping the line numbering intact.