projects
/
WP-Plugins
/
glm-member-db.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
418c050
)
Update for drop and upload image files.
author
Steve Sutton
<steve@gaslightmedia.com>
Wed, 29 Aug 2018 14:13:53 +0000
(10:13 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Wed, 29 Aug 2018 14:13:53 +0000
(10:13 -0400)
If file has a ' in it, it's breaking sql.
models/admin/ajax/imageUpload.php
patch
|
blob
|
history
diff --git
a/models/admin/ajax/imageUpload.php
b/models/admin/ajax/imageUpload.php
index
96ec13d
..
c08c6c1
100644
(file)
--- a/
models/admin/ajax/imageUpload.php
+++ b/
models/admin/ajax/imageUpload.php
@@
-265,16
+265,15
@@
class GlmMembersAdmin_ajax_imageUpload extends GlmDataImages
)
VALUES
(
- '".
$file['name']
."',
- '".
$file['newFileName']
."',
+ '".
addslashes( $file['name'] )
."',
+ '".
addslashes( $file['newFileName'] )
."',
'',
- '".addslashes(
$caption
)."',
+ '".addslashes(
$caption
)."',
".$this->config['status_numb']['Active'].",
- 99,
- $refType,
- $refDest
- );
- ";
+ 99,
+ $refType,
+ $refDest
+ )";
$this->wpdb->query($sql);
$queryError = $this->wpdb->last_error;