Skip to content

Commit d4ad5f1

Browse files
committed
address greptile comments
1 parent 49da60a commit d4ad5f1

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

apps/sim/lib/core/security/input-validation.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -595,26 +595,6 @@ describe('validateUrlWithDNS', () => {
595595
expect(result.isValid).toBe(false)
596596
})
597597
})
598-
599-
describe('DNS resolution', () => {
600-
it('should accept valid public URLs and return resolved IP', async () => {
601-
const result = await validateUrlWithDNS('https://example.com')
602-
expect(result.isValid).toBe(true)
603-
expect(result.resolvedIP).toBeDefined()
604-
expect(result.originalHostname).toBe('example.com')
605-
})
606-
607-
it('should reject URLs that resolve to private IPs', async () => {
608-
const result = await validateUrlWithDNS('https://localhost.localdomain')
609-
expect(result.isValid).toBe(false)
610-
})
611-
612-
it('should reject unresolvable hostnames', async () => {
613-
const result = await validateUrlWithDNS('https://this-domain-does-not-exist-xyz123.invalid')
614-
expect(result.isValid).toBe(false)
615-
expect(result.error).toContain('could not be resolved')
616-
})
617-
})
618598
})
619599

620600
describe('createPinnedUrl', () => {

apps/sim/lib/webhooks/gmail-polling-service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ export async function pollGmailWebhooks() {
171171
organizationId: cs.organizationId,
172172
}
173173
)
174+
await markWebhookFailed(webhookId)
175+
failureCount++
174176
return
175177
}
176178
}

apps/sim/lib/webhooks/outlook-polling-service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ export async function pollOutlookWebhooks() {
220220
organizationId: cs.organizationId,
221221
}
222222
)
223+
await markWebhookFailed(webhookId)
224+
failureCount++
223225
return
224226
}
225227
}

0 commit comments

Comments
 (0)