Skip to content

Commit

Permalink
Body to Query change in Get-Methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Kretchen001 committed May 21, 2024
1 parent c56e4a4 commit 3ae6e78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public IActionResult GetFullTextCve([FromQuery] string? cve_number) {
/// <returns>Ok with result. NoContent if empty.</returns>
[HttpGet]
[Route("checkSinglePackage")]
public IActionResult CheckSinglePackage([FromBody] PackageForApi packageName) {
public IActionResult CheckSinglePackage([FromQuery] PackageForApi packageName) {
if (!(this.Request.Headers.Accept.Equals("application/json") || this.Request.Headers.Accept.Equals("*/*"))) {
return StatusCode(406);
}
Expand Down Expand Up @@ -246,7 +246,7 @@ public IActionResult CheckSinglePackage([FromBody] PackageForApi packageName) {
/// <returns>OK, if exists. OK, if no package list searched. NoContent if not found.</returns>
[HttpGet]
[Route("checkPackageList")]
public async Task<IActionResult> CheckPackageListAsync([FromBody] List<PackageForApi> packages) {
public async Task<IActionResult> CheckPackageListAsync([FromQuery] List<PackageForApi> packages) {

Check warning on line 249 in code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs

View workflow job for this annotation

GitHub Actions / build-and-test-ubuntu-latest

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 249 in code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs

View workflow job for this annotation

GitHub Actions / build-and-test-ubuntu-latest

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 249 in code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs

View workflow job for this annotation

GitHub Actions / build-and-test-windows-latest

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 249 in code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs

View workflow job for this annotation

GitHub Actions / build-and-test-windows-latest

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 249 in code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs

View workflow job for this annotation

GitHub Actions / build-and-test-macOS-latest

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 249 in code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs

View workflow job for this annotation

GitHub Actions / build-and-test-macOS-latest

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
if (!(this.Request.Headers.Accept.Equals("application/json") || this.Request.Headers.Accept.Equals("*/*"))) {
return StatusCode(406);
}
Expand Down

0 comments on commit 3ae6e78

Please sign in to comment.