- 04 Feb, 2021 40 commits
-
-
Yorick Peterse authored
In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50063 we introduced code for generating Markdown changelogs using the API, using a custom template language. The compiler for this language would convert a custom syntax into ERB, making sure arbitrary code execution isn't possible; or so we thought. In https://gitlab.com/gitlab-org/gitlab/-/issues/300224 we found a way to bypass the template engine's harness, and run arbitrary Ruby code. In response to this issue, I decided to investigate replacing the setup with something more secure. We always planned on doing so when deemed necessary, unfortunately that need arrived sooner than expected. In this commit we replace the regex/ERB based setup with a parser built using Parslet (http://kschiess.github.io/parslet/). Parslet makes it pretty easy to write a parser, and was already an indirect dependency of GitLab (through the license_finder Gem). This new parser doesn't allow for arbitrary code execution, doesn't depend on ERB, and is less fragile compared to the old setup. Templates are executed by walking and evaluating the AST nodes the parser produces. While this won't break any speed records, it's easy to maintain and understand, and fast enough for our needs. In this new setup there is a slight difference compared to the old setup. In the old setup, expression tags on their own line don't add a new line. So this: foo {% if something %}{% end %} bar Compiles into this: foo bar Getting this right using the Parslet parser proved difficult, so we took a slightly different approach: any newline following an expression tag (if, else, end, and each) consumes the newline that directly follows it (if any). This requires only a small change in the template, is easy to implement, and still intuitive to the user. As part of this commit we also fix a small bug that would lead to empty entries being included in the template, and add a note about using the right YAML syntax to preserve newlines.
-
Peter Leitzen authored
Fix timeout problems on test webhooks See merge request gitlab-org/gitlab!52646
-
Mike Jang authored
Clarify documentation for audit_json.log See merge request gitlab-org/gitlab!52829
-
Mike Jang authored
-
Bob Van Landuyt authored
GraphQL: Add fields selection to export requirements mutation See merge request gitlab-org/gitlab!52706
-
Eugenia Grieff authored
- Add new argument to GraphQL mutation - Add permitted fields to export service - Add specs
-
Ezekiel Kigbo authored
Fix bug, where the download email patches and plain diffs links did not download from the commit page See merge request gitlab-org/gitlab!52899
-
Arturo Herrero authored
Fix snippet repository storage move API when snippet does not exist See merge request gitlab-org/gitlab!53211
-
Markus Koller authored
Disable spellcheck on metrics dictionary See merge request gitlab-org/gitlab!53308
-
Amy Qualls authored
This page can't be brought up to GitLab tone and style because it is autogenerated by a script we can't easily change. Disable spell checking on this page.
-
Mikołaj Wawrzyniak authored
Fix opensearch for anonymous users See merge request gitlab-org/gitlab!53056
-
Kushal Pandya authored
Update question mark icon while checking pipeline status See merge request gitlab-org/gitlab!52760
-
Yogi authored
-
Kushal Pandya authored
Apply new GitLab UI for badges in the project branch list See merge request gitlab-org/gitlab!52868
-
Yogi authored
-
Kushal Pandya authored
Updated diffs notes app to use paginated notes See merge request gitlab-org/gitlab!52089
-
Sean McGivern authored
BulkImports: always log the current pipeline See merge request gitlab-org/gitlab!53257
-
Rémy Coutable authored
Update docs review apps to use project token See merge request gitlab-org/gitlab!53336
-
Sean McGivern authored
Merge branch '294266-parse-example-alert-payload-to-return-list-of-payload-alert-fields' into 'master' Resolve "Parse example alert payload to return list of payload alert fields" See merge request gitlab-org/gitlab!50823
-
Natalia Tepluhina authored
Use gl-dropdown in pipeline manual actions See merge request gitlab-org/gitlab!53223
-
Scott Hampton authored
Edited UI copy to comply with GitLab style See merge request gitlab-org/gitlab!50676
-
Russell Dickenson authored
-
Phil Hughes authored
Remove unused tree files See merge request gitlab-org/gitlab!53188
-
Sean McGivern authored
Disable ETag caching on notes due to issues with pagination See merge request gitlab-org/gitlab!52765
-
David Kim authored
-
Vitali Tatarintev authored
Add the job size to start message logging See merge request gitlab-org/gitlab!53248
-
Sanad Liaquat authored
Remove retry on allow_local_requests_from_web_hooks_and_services See merge request gitlab-org/gitlab!53140
-
Sanad Liaquat authored
-
Stan Hu authored
Update Gitaly version See merge request gitlab-org/gitlab!53339
-
Peter Leitzen authored
Add dot to GraphQL descriptions of epic_type.rb See merge request gitlab-org/gitlab!53228
-
Mikołaj Wawrzyniak authored
Remove hardcoded values from projets api test See merge request gitlab-org/gitlab!53126
-
Mikołaj Wawrzyniak authored
Enable SSH key expiration enforcement See merge request gitlab-org/gitlab!53035
-
Phil Hughes authored
Fix password reset link See merge request gitlab-org/gitlab!53274
-
Cynthia Ng authored
-
Phil Hughes authored
Apply new GitLab UI for buttons in tags page See merge request gitlab-org/gitlab!52862
-
Yogi authored
-
Nicolò Maria Mezzopera authored
GitLab UI buttons and input style for project graph page See merge request gitlab-org/gitlab!52864
-
Yogi authored
-
Rémy Coutable authored
Add descriptions to MergeRequestStateEnum See merge request gitlab-org/gitlab!53082
-
Jonathan Schafer authored
Add missing values Add descriptions to values Update schema Update documentation
-