Skip to content

Commit

Permalink
Add safety check when interacting with parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
confused-Techie committed Jan 31, 2024
1 parent ad50a2a commit 6bdf643
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions microservices/download/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function query_os(req) {
let raw = req; // The URL string containing any number of query params.
let prov = undefined;

if (typeof raw !== "string") {
return false;
}

let full = raw.split("&");

for (const param of full) {
Expand Down

0 comments on commit 6bdf643

Please sign in to comment.