mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
fix(api): Validate static data value for resource workflow (#3736)
This commit is contained in:
@@ -64,6 +64,17 @@ function createApiRouter(
|
||||
validate: (identifier: string) =>
|
||||
validator.isUUID(identifier) || validator.isEmail(identifier),
|
||||
},
|
||||
{
|
||||
name: 'jsonString',
|
||||
validate: (data: string) => {
|
||||
try {
|
||||
JSON.parse(data);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
validateSecurity: {
|
||||
handlers: {
|
||||
|
||||
Reference in New Issue
Block a user