File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,9 @@ export function getCreateFDWSql({
118118 . map ( ( option ) => `${ option . name } ''%s''` )
119119 const unencryptedOptionsSqlArray = unencryptedOptions
120120 . filter ( ( option ) => formState [ option . name ] )
121- // wrap all options in double quotes, some option names have dots in them
122- . map ( ( option ) => `"${ option . name } " ''${ formState [ option . name ] } ''` )
121+ // wrap all option names in double quotes to handle dots
122+ // wrap all options values in single quotes, replace single quotes with 4 single quotes to escape them in SQL past the execute format
123+ . map ( ( option ) => `"${ option . name } " ''${ formState [ option . name ] . replace ( / ' / g, `''''` ) } ''` )
123124 const optionsSqlArray = [ ...encryptedOptionsSqlArray , ...unencryptedOptionsSqlArray ] . join ( ',' )
124125
125126 const createServerSql = /* SQL */ `
You can’t perform that action at this time.
0 commit comments