File tree Expand file tree Collapse file tree 5 files changed +15
-11
lines changed
tests/RazorPagesTestSample.Tests Expand file tree Collapse file tree 5 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 18
18
id-token : write
19
19
environment :
20
20
name : ${{ inputs.environment }}
21
- url : " https://techexcel -${{ inputs.environment }}.azurewebsites.net/"
21
+ url : " https://ghwxvgb4jngfa -${{ inputs.environment }}.azurewebsites.net/"
22
22
steps :
23
23
24
24
with :
Original file line number Diff line number Diff line change 1
1
2
2
.DS_Store
3
+ # Local configuration file for developers
4
+ src /Application /src /RazorPagesTestSample /config.json
Original file line number Diff line number Diff line change @@ -92,10 +92,16 @@ public async Task<IActionResult> OnPostAnalyzeMessagesAsync()
92
92
return RedirectToPage ( ) ;
93
93
}
94
94
95
- public static void WriteToDirectory ( ZipArchiveEntry entry , string destDirectory )
96
- {
97
- string destFileName = Path . Combine ( destDirectory , entry . FullName ) ;
98
- entry . ExtractToFile ( destFileName ) ;
99
- }
95
+
96
+
97
+ public static void WriteToDirectory ( ZipArchiveEntry entry , string destDirectory )
98
+ {
99
+ string destFileName = Path . GetFullPath ( Path . Combine ( destDirectory , entry . FullName ) ) ;
100
+ string fullDestDirPath = Path . GetFullPath ( destDirectory + Path . DirectorySeparatorChar ) ;
101
+ if ( ! destFileName . StartsWith ( fullDestDirPath ) ) {
102
+ throw new System . InvalidOperationException ( "Entry is outside the target dir: " + destFileName ) ;
103
+ }
104
+ entry . ExtractToFile ( destFileName ) ;
105
+ }
100
106
}
101
107
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 13
13
<PackageReference Include =" Microsoft.EntityFrameworkCore.InMemory" Version =" 8.0.3" />
14
14
<PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.9.0" />
15
15
<PackageReference Include =" Moq" Version =" 4.20.70" />
16
- <PackageReference Include =" Newtonsoft.Json" Version =" 11 .0.2 " />
16
+ <PackageReference Include =" Newtonsoft.Json" Version =" 13 .0.3 " />
17
17
<PackageReference Include =" System.Diagnostics.TraceSource" Version =" 4.3.0" />
18
18
<PackageReference Include =" System.Net.Http" Version =" 4.3.4" />
19
19
<PackageReference Include =" xunit" Version =" 2.7.0" />
You can’t perform that action at this time.
0 commit comments