Skip to content

Commit

Permalink
force typecasting?
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Aug 7, 2023
1 parent 613427d commit af8ab3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PublicWebhooks/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if ($Request.CIPPID -in $Webhooks.CIPPID) {
$body = $request.query.ValidationToken
}
Write-Host "Request body: $($request.body | ConvertTo-Json -Depth 10)"
foreach ($ReceivedItem in $Request.body) {
foreach ($ReceivedItem in ([pscustomobject]$Request.body)) {
Write-Host "ContentUri received: $($ReceivedItem.ContentUri)"
if ($ReceivedItem.ContentUri -notlike "https://manage.office.com/api/v1.0/*") {
Write-Host "Potential url forgery detected. Quitting to not send headers."
Expand Down

0 comments on commit af8ab3e

Please sign in to comment.