Skip to content

Commit

Permalink
something funky with conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Aug 7, 2023
1 parent af8ab3e commit 06ffc05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PublicWebhooks/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ if ($Request.CIPPID -in $Webhooks.CIPPID) {
Write-Host "Validation token received"
$body = $request.query.ValidationToken
}
Write-Host "Request body: $($request.body | ConvertTo-Json -Depth 10)"
foreach ($ReceivedItem in ([pscustomobject]$Request.body)) {
Write-Host "Request body: $($request.body.gettype())"
foreach ($ReceivedItem In ($Request.body)) {
$ReceivedItem = [pscustomobject]$ReceivedItem
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 06ffc05

Please sign in to comment.