Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3e8d6d

Browse files
committed
Fixed MySQL comment injection
1 parent ccedadd commit f3e8d6d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

extra/mysqludfsys/command_execution/linux.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ UPDATE udftest SET data=CONCAT(data,0x000000000000000004000000000000006500000001
4646
--
4747
-- Note that /TODO/plugin DOES NOT
4848
-- exist by default so it is NOT possible to save the SO in the proper
49-
-- folder where MySQL server looks for SOs.
49+
-- folder where MySQL server looks for SOs.
50+
-- SHOW VARIABLES WHERE variable_name='plugin_dir';
5051
--
5152
-- References:
5253
-- http://dev.mysql.com/doc/refman/5.1/en/create-function-udf.html

plugins/dbms/mysql.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,16 @@ def __commentCheck(self):
146146

147147
return None
148148

149-
# MySQL valid versions updated on 02/2009
149+
# MySQL valid versions updated on 05/2009
150150
versions = (
151151
(32200, 32233), # MySQL 3.22
152152
(32300, 32359), # MySQL 3.23
153153
(40000, 40031), # MySQL 4.0
154154
(40100, 40122), # MySQL 4.1
155155
(50000, 50077), # MySQL 5.0
156-
(50100, 50132), # MySQL 5.1
157-
(60000, 60009), # MySQL 6.0
156+
(50100, 50134), # MySQL 5.1
157+
(50400, 50401), # MySQL 5.4
158+
(60000, 60010), # MySQL 6.0
158159
)
159160

160161
for element in versions:
@@ -206,7 +207,6 @@ def getFingerprint(self):
206207
value += actVer
207208
return value
208209

209-
# TODO: comment injection fingerprint is broken, fix
210210
comVer = self.__commentCheck()
211211
blank = " " * 15
212212
value += "active fingerprint: %s" % actVer

0 commit comments

Comments
 (0)