mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Verify token format
This commit is contained in:
parent
af90b20f12
commit
8eabdd17ba
2 changed files with 12 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ function Install-Endpoint {
|
|||
}
|
||||
}
|
||||
|
||||
# Validate token to prevent command/property injection via msiexec
|
||||
if ($token -match '[";`$\s]') {
|
||||
Write-Error-Custom "Invalid token format. Token must not contain quotes, semicolons, backticks, dollar signs, or whitespace."
|
||||
}
|
||||
|
||||
# 2. Download the .msi
|
||||
$msiFile = Join-Path $env:TEMP "SafeChainUltimate-$([System.Guid]::NewGuid().ToString('N')).msi"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue