Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 8c3a06b

Browse files
Potential fix for code scanning alert no. 16: Server-side request forgery
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent eb38fd0 commit 8c3a06b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pages/api/all/[ticket].js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ export default function handler(req, res) {
1717
return res.status(400).json({ error: `Ticket not found in the available list. Go to ${process.env.URL}/api/fundamentus/available` });
1818
}
1919

20+
const validatedTicket = stockData.ticker; // Use the validated ticker from stockList
21+
2022
return Promise.all([
21-
axios.get(`${process.env.URL}/api/fundamentus/${ticket}`),
22-
axios.get(`${process.env.URL}/api/quote/${ticket}`)
23+
axios.get(`${process.env.URL}/api/fundamentus/${validatedTicket}`),
24+
axios.get(`${process.env.URL}/api/quote/${validatedTicket}`)
2325
]).then(([fundamentusData, quoteData]) => {
2426
const combinedData = {
2527
ticket: ticket,

0 commit comments

Comments
 (0)