mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
Bugfix/Securely Fetch Links (#5200)
- Added `secureFetch` and `checkDenyList` functions from `httpSecurity` to enhance security in web crawling and link fetching processes. - Updated relevant functions to utilize these new security measures, ensuring safer data handling.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { webCrawl, xmlScrape } from 'flowise-components'
|
||||
import { webCrawl, xmlScrape, checkDenyList } from 'flowise-components'
|
||||
import { StatusCodes } from 'http-status-codes'
|
||||
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
|
||||
import { getErrorMessage } from '../../errors/utils'
|
||||
@@ -6,6 +6,8 @@ import { getErrorMessage } from '../../errors/utils'
|
||||
const getAllLinks = async (requestUrl: string, relativeLinksMethod: string, queryLimit: string): Promise<any> => {
|
||||
try {
|
||||
const url = decodeURIComponent(requestUrl)
|
||||
await checkDenyList(url)
|
||||
|
||||
if (!relativeLinksMethod) {
|
||||
throw new InternalFlowiseError(
|
||||
StatusCodes.INTERNAL_SERVER_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user