Commit ce8705a
Replace Path.Combine with Path.Join (#2997)
* Replace Path.Combine with Path.Join across all C# files
Path.Join is preferred over Path.Combine because it does not treat
absolute path segments as rooted, preventing potential path traversal
issues. See dotnet/runtime#24263
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix IDE0370: remove unnecessary null-forgiving operators in ChangelogRemoveService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Address CodeRabbit review: path traversal hardening, URL construction fixes, and shared utilities
- Add UrlPath static class for URL-safe path joining (always '/', normalises backslashes)
- Add Paths.ValidateSinglePathSegment shared utility; remove duplicated copies
- GitLinkIndexReader: replace IsPathRooted check with full-path containment
validation to block '..' traversal segments
- DetectionRuleFile: handle Windows path separator in relative path prefix trim
- HtmlWriter: use UrlPath.Join/JoinUrl instead of Path.Join for URL construction
- RepositorySourcesFetcher: use Paths.ValidateSinglePathSegment before joining
repo.Name into filesystem paths
- DocumentationWebHost: verify slug-derived path stays under ApiPath
- StaticWebHost: verify slug-derived path stays under content root
- SiteNavigationTests: remove redundant nested Path.Join call
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix import ordering in HtmlWriter.cs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Forward appendRepositoryName and assumeCloned on CloneRef retry
Retry calls were dropping non-default arguments, causing retries to
resolve a different checkout folder than the initial attempt.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 61dd902 commit ce8705a
104 files changed
Lines changed: 894 additions & 838 deletions
File tree
- src
- Elastic.ApiExplorer
- Elastic.Codex
- Building
- Sourcing
- Elastic.Documentation.Configuration
- Assembler
- Builder
- ReleaseNotes
- Toc
- Elastic.Documentation.LegacyDocs
- Elastic.Documentation.LinkIndex
- Elastic.Documentation.Links
- CrossLinks
- InboundLinks
- Elastic.Documentation.Site/FileProviders
- Elastic.Documentation
- Extensions
- Elastic.Markdown
- Exporters
- Extensions/DetectionRules
- IO
- Myst
- Directives
- CsvInclude
- Include
- Settings
- InlineParsers
- authoring/Elastic.Documentation.Refactor
- Tracking
- services
- Elastic.Changelog
- Bundling
- Configuration
- Creation
- Evaluation
- GithubRelease
- Rendering
- Asciidoc
- Markdown
- Elastic.Documentation.Assembler
- Building
- Configuration
- Deploying/Synchronization
- Sourcing
- Elastic.Documentation.Isolated
- tooling/docs-builder
- Arguments
- Commands
- Codex
- Filters
- Http
- tests-integration/Elastic.Assembler.IntegrationTests
- tests
- Elastic.Changelog.Tests/Changelogs
- Create
- Render
- Elastic.Documentation.Build.Tests
- Elastic.Documentation.Configuration.Tests
- Elastic.Markdown.Tests
- Directives
- DocSet
- Mover
- SettingsInclusion
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
| 153 | + | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments