Commit Graph

1013 Commits

Author SHA1 Message Date
Henry Heng 0ad98a0c29
Update packages/server/src/utils/createAttachment.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-11-06 14:28:14 +00:00
Henry f4281457df path traversal check on chatId 2025-11-06 11:14:05 +00:00
Henry Heng ec1762b10f
Release/3.0.9 (#5427)
flowise@3.0.9
2025-11-06 10:27:13 +00:00
Lê Nam Khánh 0f8d45d25c
chore: fix typos in packages/server/src/utils/buildChatflow.ts (#5414)
Fix typos in packages/server/src/utils/buildChatflow.ts
2025-11-05 13:00:06 +00:00
Lê Nam Khánh 3e8db185dd
chore: fix typos in packages/server/src/utils/index.ts (#5413)
Fix typos in packages/server/src/utils/index.ts
2025-11-05 12:59:46 +00:00
Ilango fd7fc2f4d7
Fix: CORS-related issues (#5310)
* remove allowed origins from public chatbot config response

* update how domains are validated in cors middleware

* fix: delete correct allowed domains keys in public chatbot config endpoint

* fix: cors substring issue

* fix: remove cors origins fallback

* fix: error when cors origins is not defined

* fix: update how cors setting is parsed and used

* fix: update how cors setting is parsed and used

* fix: address pr comments

* fix: use workspaceId if available in cors middleware

* fix: global cors blocks chatflow-level validation for predictions

* fix: add error handling to domain validation
2025-11-05 14:58:17 +05:30
shou tokunaga 0149688a16
Add multilingual response support for Generate Instructions (#5397)
Update guidelines for task response language and reasoning

Emphasize the importance of responding in the same language as the task description and clarify guidelines for reasoning and conclusions.
2025-10-31 12:55:39 +00:00
Henry Heng 5df09a15b8
Chore/WorkspaceID Check (#5228)
* feat: Require workspace ID for API key operations

- Added validation to ensure `activeWorkspaceId` is present in user requests for all API key operations (get, create, update, import, delete).
- Updated `getWorkspaceSearchOptions` and `getWorkspaceSearchOptionsFromReq` to throw an error if `workspaceId` is not provided.
- Modified service methods to enforce `workspaceId` as a required parameter for database operations related to API keys.

* feat: Enforce workspace ID as a required field across multiple interfaces and services
- Updated various interfaces to make `workspaceId` a mandatory field instead of optional.
- Enhanced assistant and export-import service methods to require `workspaceId` for operations, ensuring proper validation and error handling.
- Modified database entity definitions to reflect the change in `workspaceId` from optional to required.
- Improved error handling in controllers to check for `activeWorkspaceId` before proceeding with requests.

* Require workspace ID in various controllers and services

- Updated controllers for credentials, datasets, document stores, evaluations, evaluators, and variables to enforce the presence of `workspaceId`.
- Enhanced error handling to throw appropriate errors when `workspaceId` is not provided.
- Modified service methods to accept `workspaceId` as a mandatory parameter for operations, ensuring consistent validation across the application.

* Update EvaluatorRunner and index to require workspaceId for evaluator retrieval

- Modified the runAdditionalEvaluators function to accept workspaceId as a parameter.

* lint fixes

* Enhancement/Integrate workspaceId in chatflow and flow-config services

- Updated chatflow and flow-config controllers to require workspaceId for fetching chatflows.
- Modified service methods to accept workspaceId as a parameter, ensuring proper context for chatflow retrieval.

* lint fix

* get rid of redundant isApiKeyValidated

* refactor: update permission checks for chatflows and agentflows routes

- Enhanced permission checks in chatflows routes to include agentflows permissions for create, read, update, and delete operations.
- Updated navigation paths in authentication views to redirect to the home page instead of chatflows after successful login or registration.

* fix(DefaultRedirect.jsx): add redirect unauthenticated users to login

* fix(RequireAuth.jsx): check permissions for routes without display property

* fix(DefaultRedirect.jsx): WorkspaceSwitcher api spam

* fix(routes/chatflows/index.ts): use checkAnyPermission for chatflow/has-changed/:id/:lastUpdatedDateTime

* fix(routes/chatflows/index.ts): use checkAnyPermission for delete request chatflow/:id

* fix(controllers/text-to-speech/index.ts): add workspace ID validation in generateTextToSpeech

* fix(controllers/internal-predictions/index.ts): add chatflow retrieval and validation using workspaceId

* feat(services\credentials\index.ts): add filter by workspaceId for getCredentialById

* chore(routes/chat-messages/index.ts): unused chat-messages route

* feat(services/chatflows/index.ts): add filter by workspaceId for deleteChatflow

* feat(services/marketplaces/index.ts): add filter by workspaceId for deleteCustomTemplate

* feat(tools): add filter by workspaceId for read, update, and delete

---------

Co-authored-by: Vinod Paidimarry <vinodkiran@outlook.in>
Co-authored-by: Yau <33013947+chungyau97@users.noreply.github.com>
Co-authored-by: chungyau97 <chungyau97@gmail.com>
2025-10-29 11:33:27 +00:00
Henry Heng e925801b63
Bugfix/shared credentials not showing on ui (#5383)
* fix shared credentials not showing on ui

* Enhance credential retrieval by including createdDate, updatedDate, and workspaceId fields; sanitize shared item data by omitting encryptedData.
2025-10-29 10:06:23 +00:00
Ilango eed7581d0e
Updates to change/reset password functionality (#5294)
* feat: require old password when changing password

* update account settings page - require old password for changing passwords

* update profile dropdown - go to /account route for updating account details

* Remove all session based on user id after password change

* fix: run lint-fix

* remove unnecessary error page on account

* fix: prevent logout if user provides wrong current password

* fix: remove unused user profile page

* fix: import

---------

Co-authored-by: Henry <hzj94@hotmail.com>
2025-10-28 20:48:28 +00:00
Ilango 37ef6ffa50
fix: add missing log filter env variables to examples (#5376)
* Sanitize sensitive fields in request header and body in logger

* fix: log request headers, body, and query only when debug logs are enabled

* fix: add missing env to examples

* fix: crash due to missing env vars
2025-10-28 16:14:49 +05:30
Ilango 2ae4678da4
Sanitize sensitive fields in request header and body in logger (#5279)
* Sanitize sensitive fields in request header and body in logger

* fix: log request headers, body, and query only when debug logs are enabled
2025-10-27 13:06:34 +05:30
Henry Heng 62d34066c9
Bugfix/Iteration blocks execution after resuming from human input (#5359)
Fix iteration blocks execution after resuming from human input
2025-10-23 15:31:40 +01:00
Henry Heng f3f2eabb89
Fix/variable resolution to support arrays of config objects (#5348)
variable resolution to support arrays of config objects

- Added handling for arrays of config objects in the resolveVariables function.
- Implemented a recursive search for config values to process all matching parameters, improving flexibility in variable resolution.
2025-10-21 15:07:33 +01:00
Yau bff859520a
Add organization filtering and error handling to login method controller (#5323)
feat(login-method.controller.ts): add organization filtering and error handling
2025-10-21 13:33:39 +08:00
Henry Heng 7ab586c865
Chore/product id telemetry (#5329)
* add telemetry for productId

* updated multiple services (chatflows, buildChatflow, upsertVector) to use the new method for fetching product ID from subscriptions, improving consistency and error handling
2025-10-17 10:53:47 +01:00
Henry Heng ac794ab6eb
Release/3.0.8 (#5301)
flowise@3.0.8
2025-10-08 12:55:17 +01:00
Henry Heng 1a410d84ac
Chore/Enhance file upload functionality in createAttachment (#5280)
Enhance file upload functionality in createAttachment

- Added support for configurable allowed file types and file upload status in createFileAttachment.
- Implemented validation to ensure uploaded files match allowed types, throwing errors for disallowed types.
2025-10-06 11:13:08 +01:00
Ilango ac252516f8
fix: migration errors for text to speech and chatflow name index (#5287)
* fix: add another migration to fix missing textToSpeech column

* fix: chatflow name index error

* fix: review
2025-10-03 10:57:16 +01:00
Ilango 9b8fee3d8f
Text to speech (#5062)
* Add tts UI

* Add tts backend

* Add description to eleven labs credentials

* Fix issue with fetching eleven labs voices

* Fix issue with text to speech tab not showing correct saved voice

* Add option to autoplay tts audio after prediction completes

* Fix crash issue when first changing tts provider

* Set up streaming response for text to speech audio

* Update controllers - fix issue with sse client getting removed before tts events are sent

* Use existing sse streamer to stream tts audio before sse client is removed

* Add tts sse to redis publisher

* Fix issues with TTS - openai voices, streaming audio, rate limiting, speed of speech

* Refactor

* Refactor TTS - fix issues with tts loading and stop audio buttons

* Abort TTS SSE when clicking the stop button

* Update SSE handling for TTS

* Fix issue with test voice feature

* Fix issue with tts voices not loading

* Update generate tts endpoint and its usage in internal chat

* Whitelist tts generate endpoint

* Refactor Text-to-Speech Provider Selection and Enhance UI Components

- Updated the text-to-speech controller to select the active provider based on status instead of the first available provider
- Added audio waveform controls and test audio functionality in the TextToSpeech component, allowing users to play and pause test audio
- Integrated Autocomplete for voice selection in the TextToSpeech component
- Implemented TTS action management in ChatMessage to prevent auto-scrolling during TTS actions

* - Implemented stopAllTTS function calls to halt existing TTS audio before playing new audio or starting a new TTS stream

* Updated the condition for enabling TTS providers to exclude the 'none' provider, ensuring only valid providers are considered for text-to-speech functionality.

* Remove unnecessary code

* Add ability to abort audio streaming in TTS and release lock on chat input

* Remove logger

* Fix tts audio not playing when clicking speaker button

* update

* TTS abort controller

* Fix abort not working for TTS autoplay

* Send metadata event when aborting autoplay TTS

* Fix UI issue

* Remove elevenlabs sdk from root package.json

* Remove redundant condition for tts autoplay in chatflow

---------

Co-authored-by: Henry <hzj94@hotmail.com>
2025-10-02 12:19:06 +01:00
Henry Heng 580957e4aa
Chore/Remove Previous Subscription (#5282)
Remove cancel subscription functionality from account controller and UI components; update email background and logo URLs across multiple email templates.
2025-10-01 12:32:30 +01:00
Henry Heng a86f618186
Chore/Secure Cookies Env Variable (#5281)
Enhanced cookie security handling in the passport middleware to allow explicit configuration of secure cookie settings.
2025-10-01 11:54:07 +01:00
Henry Heng 0065e8f1a0
Feature/Update Loop Agentflow (#4957)
* Feature: Update Loop Agentflow to include fallback message and version increment to 1.1

- Added a new input parameter 'fallbackMessage' to the Loop Agentflow for displaying a message when the loop count is exceeded.
- Incremented the version of Loop Agentflow from 1.0 to 1.1.
- Updated the processing logic to handle the fallback message appropriately when the maximum loop count is reached.

* - Introduced a new input parameter 'loopUpdateState' to allow updating the runtime state during workflow execution.
- Added a method to list runtime state keys for dynamic state management.
- Implemented logic to retrieve and utilize the current loop count in variable resolution.
- Updated the Loop Agentflow output to reflect the new state and final output content.
2025-09-28 22:08:08 +01:00
Yau b5da234ce7
Add environment variable control for trust proxy setting (#5226)
* feat: allow trust proxy setting to be configured via environment variable

* fix: restore HTTP_DENY_LIST in .env.example after merge conflict

* feat: add conditional handling for trust proxy

* feat: add trust proxy environment variable documentation

* feat: add trust proxy environment variable sample value

* fix: handle empty trust proxy string in docker environment

---------

Co-authored-by: Henry Heng <henryheng@flowiseai.com>
2025-09-27 14:08:55 +01:00
Ilango e48f28d13d
Update SSL-related env for database connections (#5242) 2025-09-26 10:05:35 +01:00
Henry Heng 41131dfac3
Feat/Enhance security validation for MCP configurations (#5232)
feat: enhance security validation for MCP configurations

- Added environment variable checks for CUSTOM_MCP_SECURITY_CHECK, CUSTOM_MCP_PROTOCOL, and HTTP_DENY_LIST across various Docker and application files.
- Implemented validation functions in MCP core to prevent command injection and ensure safe environment variable usage
2025-09-18 14:37:31 +01:00
Henry Heng 42152dd036
Chore/Disable Available Dep By Default (#5231)
disable available dependencies by default, only allow when ALLOW_BUILTIN_DEP is set to true
2025-09-18 12:03:08 +01:00
Henry Heng c4322ce70b
Release/3.0.7 (#5214)
flowise@3.0.7
2025-09-15 16:58:42 +01:00
Henry Heng 05763db8d3
Bugfix/Create Index Chatflow Name (#5213)
Refactor index creation for chat_flow name across multiple databases to limit indexed length to 255 characters
2025-09-15 16:54:00 +01:00
Henry Heng 89a0f23fe5
Release/3.0.6 (#5210)
flowise@3.0.6
2025-09-15 12:07:20 +01:00
Henry Heng c00ae78488
Bugfix/add path traversal check to chatId (#5208)
* add path traversal check to chatId

* update axios
2025-09-13 23:47:22 +01:00
Henry Heng b2dcdab5b9
Chore/ChatflowID CamelCase (#5205)
* add acceptVariable property to vector store metadata filter

* add accepVariadd acceptVariable property to other json fields

* add camelcase chatflowId to flowConfig
2025-09-13 12:11:49 +01:00
Henry Heng e002e617df
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.
2025-09-12 16:34:28 +01:00
Henry Heng 4987a2880d
Bugfix/Array Input Variables (#5196)
- Replace manual template variable processing in multiple components with a new utility function `processTemplateVariables`.
2025-09-12 14:42:34 +01:00
Henry Heng 32bf030924
Chore/Add telemetry for productId (#5188)
add telemetry for productId
2025-09-10 15:48:59 +01:00
TensorNull 099cf481b4
feat: add CometAPI integration with ChatCometAPI node (#5160)
* feat: add CometAPI integration with ChatCometAPI node and credential support

* feat: remove timeout and stop sequence parameters from ChatCometAPI node
2025-09-10 12:50:53 +08:00
Ong Chung Yau c17dd1f141
Fix use case-insensitive email lookup and comparison during login (#5145)
fix: use case-insensitive email lookup and comparison
2025-09-05 14:04:12 +01:00
anatolii burtsev 42fed5713e
feat: execution filter by agentflow name (#5117)
* feat: Add agentflow name filter to executions page

- Add agentflow name text field to executions filter UI
- Implement backend filtering with case-insensitive partial matching
- Add database index on chat_flow.name for improved query performance
- Support filtering executions by agentflow name across all database types

* chore: Fix linting issues and remove screenshot

- Apply prettier formatting to migration files
- Fix formatting in executions service
- Remove accidentally committed screenshot file
2025-09-05 14:01:30 +01:00
Ong Chung Yau 9e178d6887
Secure password reset endpoints (#5167)
fix: prevent sensitive data exposure in password reset
2025-09-04 18:14:11 +08:00
Luis Felipe Salazar Ucros bf1ddc3be5
Feature: Add SambaNova (#4961)
* add sambanova

* add sambanova credential

* fix samba nova chat node

---------

Co-authored-by: Henry <hzj94@hotmail.com>
2025-08-18 22:09:39 +08:00
Henry Heng ad0679801a
Bugfix/Upsert API for file loader (#5096)
* fix upser api for file loader

* - Introduced loaderName property in IDocumentStoreUpsertData interface.
- Updated upsertDocStore function to utilize loaderName if provided.
- Enhanced DocStoreAPIDialog to allow loaderName customization in API requests.
- Modified DocumentStoreDetail to display file names when available, improving source formatting logic.
2025-08-18 18:35:50 +08:00
Ong Chung Yau 4ce0851858
Fix chatflow's type null or blank (#5065)
* fix(entities/ChatFlow.ts): make type column non-nullable with default value

* fix(postgres/ModifyChatflowType): set default type and make column non-nullable

* fix(sqlite/ModifyChatflowType): set default type and make column non-nullable

* fix(mysql/ModifyChatflowType): set default type and make column non-nullable

* chore(sqlite/ModifyChatflowType): standardize type column to VARCHAR(20)

* chore(postgres/ModifyChatflowType): standardize type column to VARCHAR(20)

* fix(mariadb/ModifyChatflowType): set default type and make column non-nullable

* chore: rename ChatflowType to EnumChatflowType and update references

* feat(chatflows): add chatflow type validation

* fix(chatflows): empty string bypassing type validation on update
2025-08-15 19:25:54 +08:00
Henry Heng 7a74e33be1
Chore/minor execution view ui fix (#5069)
* minor execution view ui fix

* add password validation
2025-08-14 21:59:34 +08:00
Henry Heng e99aecb473
Chore/remove redundant loggers (#5067)
remove redundant loggers
2025-08-14 15:52:53 +08:00
Henry Heng ba6a602cbe
Release/3.0.5 (#5054)
flowise@3.0.5 release
2025-08-11 19:59:22 +08:00
Mewyii 9c070c7205
Puppeteer / Playwright web crawler bug fixes/improvements (#4998)
* feature/bugfix: added otpional css selector to puppeteer web scraper, fixed error when puppeteerLoader does not work.

* feature: added button to add empty link in web scraper tools

* feature: added custom executable file path as an input to puppeteer to fix issues when puppeteer can not find/launch the browser.

* feature: added new puppeteer features to playwright aswell.

* fixed review comments
2025-08-08 19:46:59 +01:00
Henry Heng b608219642
Feature/OpenAI Response API (#5014)
* - Added support for built-in OpenAI tools including web search, code interpreter, and image generation.
- Enhanced file handling by extracting artifacts and file annotations from response metadata.
- Implemented download functionality for file annotations in the UI.
- Updated chat history management to include additional kwargs for artifacts, file annotations, and used tools.
- Improved UI components to display used tools and file annotations effectively.

* remove redundant currentContainerId

* update comment
2025-08-07 17:59:05 +01:00
Ong Chung Yau 9e743e4aa1
Fix import null bytes error (#5036)
fix: sanitize null bytes in import data from SQLite
2025-08-07 18:11:53 +08:00
Ong Chung Yau 78144f37b5
Feature update public-chatflow access control (#4978)
* feat: update public-chatflow access control

* chore: deprecate getSinglePublicChatflow method

* chore: remove RequireAuthIfNotpublic
2025-08-05 01:57:28 +08:00
Henry Heng e3e4d6a904
Bugfix/Override State WhenStartPersistState (#5017)
- Added support for overriding startState from overrideConfig even when startPersistState is true
2025-08-04 13:36:13 +01:00