Skip to content

Commit

Permalink
Fix code scanning alert no. 9: Missing regular expression anchor
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
1 parent cc1d482 commit 56055c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/participants/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ module.exports = [
description: 'Record Funds In or Out of participant account',
validate: {
payload: Joi.object({
transferId: Joi.string().pattern(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9A-HJKMNP-TV-Z]{26}$/).required(),
transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9A-HJKMNP-TV-Z]{26})$/).required(),
externalReference: Joi.string().required(),
action: Joi.string().required().valid('recordFundsIn', 'recordFundsOutPrepareReserve').label('action is missing or not supported'),
reason: Joi.string().required(),
Expand Down Expand Up @@ -345,7 +345,7 @@ module.exports = [
params: Joi.object({
name: nameValidator,
id: Joi.number().integer().positive(),
transferId: Joi.string().pattern(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9A-HJKMNP-TV-Z]{26}$/).required()
transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9A-HJKMNP-TV-Z]{26})$/).required()
})
}
}
Expand Down

0 comments on commit 56055c3

Please sign in to comment.