Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet] RC custom action #3099

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ tests/:
Test_Lfi_Capability: missing_feature
Test_Lfi_Mandatory_SpanTags: v2.52.0
Test_Lfi_Optional_SpanTags: v2.52.0
Test_Lfi_RC_CustomAction: bug
Test_Lfi_RC_CustomAction: v3.3.0
Test_Lfi_StackTrace: v2.51.0
Test_Lfi_Telemetry: v2.51.0
Test_Lfi_UrlQuery: v2.51.0
Expand Down
11 changes: 9 additions & 2 deletions utils/build/docker/dotnet/weblog/Controllers/RaspController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,15 @@ private IActionResult ExecuteCommandInternal(string commandLine)
[HttpGet("lfi")]
public IActionResult lfiGet(string file)
{
var result = System.IO.File.ReadAllText(file);
return Content(result);
try
{
var result = System.IO.File.ReadAllText(file);
return Content(result);
}
catch (System.IO.FileNotFoundException ex)
{
return Content("File not found");
}
}

[XmlRoot("file")]
Expand Down
Loading