mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Chore/Prevent invalid http redirect (#4990)
prevent invalid http redirect
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { z } from 'zod'
|
||||
import fetch from 'node-fetch'
|
||||
import { DynamicStructuredTool } from '../OpenAPIToolkit/core'
|
||||
import { checkDenyList } from '../../../src/httpSecurity'
|
||||
import { secureFetch } from '../../../src/httpSecurity'
|
||||
|
||||
export const desc = `Use this when you want to execute a PUT request to update or replace a resource.`
|
||||
|
||||
@@ -127,10 +126,7 @@ export class RequestsPutTool extends DynamicStructuredTool {
|
||||
...this.headers
|
||||
}
|
||||
|
||||
// Check if URL is allowed by security policy
|
||||
await checkDenyList(inputUrl)
|
||||
|
||||
const res = await fetch(inputUrl, {
|
||||
const res = await secureFetch(inputUrl, {
|
||||
method: 'PUT',
|
||||
headers: requestHeaders,
|
||||
body: JSON.stringify(inputBody)
|
||||
|
||||
Reference in New Issue
Block a user