Skip to content

Commit

Permalink
Potential fix for code scanning alert no. 2: Resource exhaustion
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
ryck and github-advanced-security[bot] authored Feb 22, 2025
1 parent 8b825ce commit 39b9d6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const scrobbleRequest = async ({ action, body, title }) => {
};

export const rateRequest = async ({ body, title, rating }) => {
if (!rating) {
logger.error(`❌ ${chalk.red(`No rating, aborting`)}`);
if (!rating || rating < 1 || rating > 10) {
logger.error(`❌ ${chalk.red(`Invalid rating, aborting`)}`);
return
}
logger.debug(JSON.stringify(body, null, 2))
Expand Down

0 comments on commit 39b9d6f

Please sign in to comment.