Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Massimiliano
ISPConfig 3
Commits
d7fe4dc9
Commit
d7fe4dc9
authored
Apr 16, 2015
by
Marius Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed problem with .* table info (GRANT X ON Y.*)
parent
305dda70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
interface/lib/classes/db_mysql.inc.php
interface/lib/classes/db_mysql.inc.php
+4
-2
server/lib/classes/db_mysql.inc.php
server/lib/classes/db_mysql.inc.php
+4
-2
No files found.
interface/lib/classes/db_mysql.inc.php
View file @
d7fe4dc9
...
...
@@ -128,8 +128,10 @@ class db extends mysqli
$sTxt
=
$this
->
escape
(
$sValue
);
$sTxt
=
str_replace
(
'`'
,
''
,
$sTxt
);
if
(
strpos
(
$sTxt
,
'.'
)
!==
false
)
$sTxt
=
preg_replace
(
'/^(.+)\.(.+)$/'
,
'`$1`.`$2`'
,
$sTxt
);
else
$sTxt
=
'`'
.
$sTxt
.
'`'
;
if
(
strpos
(
$sTxt
,
'.'
)
!==
false
)
{
$sTxt
=
preg_replace
(
'/^(.+)\.(.+)$/'
,
'`$1`.`$2`'
,
$sTxt
);
$sTxt
=
str_replace
(
'.`*`'
,
'.*'
,
$sTxt
);
}
else
$sTxt
=
'`'
.
$sTxt
.
'`'
;
$sQuery
=
substr_replace
(
$sQuery
,
$sTxt
,
$iPos2
,
2
);
$iPos2
+=
strlen
(
$sTxt
);
...
...
server/lib/classes/db_mysql.inc.php
View file @
d7fe4dc9
...
...
@@ -132,8 +132,10 @@ class db extends mysqli
if
(
$iPos2
!==
false
&&
(
$iPos
===
false
||
$iPos2
<=
$iPos
))
{
$sTxt
=
$this
->
escape
(
$sValue
);
if
(
strpos
(
$sTxt
,
'.'
)
!==
false
)
$sTxt
=
preg_replace
(
'/^(.+)\.(.+)$/'
,
'`$1`.`$2`'
,
$sTxt
);
else
$sTxt
=
'`'
.
$sTxt
.
'`'
;
if
(
strpos
(
$sTxt
,
'.'
)
!==
false
)
{
$sTxt
=
preg_replace
(
'/^(.+)\.(.+)$/'
,
'`$1`.`$2`'
,
$sTxt
);
$sTxt
=
str_replace
(
'.`*`'
,
'.*'
,
$sTxt
);
}
else
$sTxt
=
'`'
.
$sTxt
.
'`'
;
$sQuery
=
substr_replace
(
$sQuery
,
$sTxt
,
$iPos2
,
2
);
$iPos2
+=
strlen
(
$sTxt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment