copyFiles_action: protect '"' from SQL
This commit is contained in:
parent
249cf7a2ff
commit
e880ed1c59
@ -37,6 +37,7 @@ copyFiles_action() {
|
|||||||
rest=${rest#*|}
|
rest=${rest#*|}
|
||||||
destfileid=${rest%%|*}
|
destfileid=${rest%%|*}
|
||||||
rest=${rest#*|}
|
rest=${rest#*|}
|
||||||
|
sourcedir=${sourcefilename%/*}
|
||||||
echo 'SELECT IFNULL( (
|
echo 'SELECT IFNULL( (
|
||||||
SELECT destination_files.filename
|
SELECT destination_files.filename
|
||||||
FROM destination_files
|
FROM destination_files
|
||||||
@ -48,7 +49,8 @@ copyFiles_action() {
|
|||||||
INNER JOIN destinations
|
INNER JOIN destinations
|
||||||
ON destinations.id=destination_files.destination_id
|
ON destinations.id=destination_files.destination_id
|
||||||
WHERE destinations.id = '$destinationid'
|
WHERE destinations.id = '$destinationid'
|
||||||
AND source_files.filename LIKE "'"${sourcefilename%/*}"'/%"
|
AND source_files.filename LIKE
|
||||||
|
"'"${sourcedir//\"/\"\"}"'/%"
|
||||||
AND mime_type_actions.action = 1
|
AND mime_type_actions.action = 1
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
),"AtOM:NotFound");
|
),"AtOM:NotFound");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user