Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
34885384
authored
2013-12-18 12:17:20 -0500
by
Marty Penner
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix an SQL injection hole in notifications
1 parent
0e493204
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
com/Notifications/Notifications.php
com/Notifications/Notifications.php
View file @
3488538
...
...
@@ -277,8 +277,36 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args =
$att2
=
isset
(
$attachments
[
1
])
?
$attachments
[
1
]
:
''
;
$att3
=
isset
(
$attachments
[
2
])
?
$attachments
[
2
]
:
''
;
$wpdb
->
query
(
"INSERT INTO wp_mail_daemon (notification_id,from_email,to_email,subject,text,html,attachment1,attachment2,attachment3,sent,sent_date) VALUES (
$nid
,'
$from_email
','
$to_email
','
$subject
','
$alttext
','
$html
','
$att1
','
$att2
','
$att3
',0,'')"
);
$wpdb
->
insert
(
'wp_mail_daemon'
,
[
'notification_id'
=>
$nid
,
'from_email'
=>
$from_email
,
'to_email'
=>
$to_email
,
'subject'
=>
$subject
,
'text'
=>
$alttext
,
'html'
=>
$html
,
'attachment1'
=>
$att1
,
'attachment2'
=>
$att2
,
'attachment3'
=>
$att3
,
'sent'
=>
0
,
'sent_date'
=>
''
],
[
'%d'
,
'%s'
,
'%s'
,
'%s'
,
'%s'
,
'%s'
,
'%s'
,
'%s'
,
'%s'
,
'%d'
,
'%s'
]
);
//send_email($uid,$email,$args, true);
}
}
...
...
Please
register
or
sign in
to post a comment