-
-
Notifications
You must be signed in to change notification settings - Fork 24.5k
fix: FLOWISE-553, 598, 616 #6464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b282e6f
1ce73c6
9e2be04
fe09b73
0abe280
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ import { SqliteSaver } from './SQLiteAgentMemory/sqliteSaver' | |
| import { DataSource } from 'typeorm' | ||
| import { PostgresSaver } from './PostgresAgentMemory/pgSaver' | ||
| import { MySQLSaver } from './MySQLAgentMemory/mysqlSaver' | ||
| import { sanitizeDataSourceOptions } from '../../../src/sanitizeDataSourceOptions' | ||
|
|
||
| class AgentMemory_Memory implements INode { | ||
| label: string | ||
|
|
@@ -96,6 +97,8 @@ class AgentMemory_Memory implements INode { | |
| label: 'Additional Connection Configuration', | ||
| name: 'additionalConfig', | ||
| type: 'json', | ||
| description: | ||
| 'Optional TypeORM connection options (e.g. ssl, connectTimeout). entities, subscribers, migrations, and extra are not allowed.', | ||
| additionalParams: true, | ||
| optional: true | ||
| } | ||
|
|
@@ -118,6 +121,7 @@ class AgentMemory_Memory implements INode { | |
| } catch (exception) { | ||
| throw new Error('Invalid JSON in the Additional Configuration: ' + exception) | ||
| } | ||
| additionalConfiguration = sanitizeDataSourceOptions(additionalConfiguration) | ||
| } | ||
|
Comment on lines
+124
to
125
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Validate additionalConfiguration = sanitizeDataSourceOptions(additionalConfiguration)
}
if (databaseType === 'sqlite' && databaseFilePath) {
validateSQLitePath(databaseFilePath)
} |
||
|
|
||
| const threadId = options.sessionId || options.chatId | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import
validateSQLitePathto secure the user-provideddatabaseFilePathagainst path traversal and arbitrary file write vulnerabilities.