Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
67fedede
Commit
67fedede
authored
Oct 23, 2014
by
Till Brehm
Browse files
Fixed: FS#3712 - Client DB credentials not escaped
parent
ccebb930
Changes
3
Hide whitespace changes
Inline
Side-by-side
install/dist/lib/fedora.lib.php
View file @
67fedede
...
...
@@ -1292,7 +1292,7 @@ class installer_dist extends installer_base {
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/mysql_clientdb.conf.master'
,
"tpl/mysql_clientdb.conf.master"
);
$content
=
str_replace
(
'{hostname}'
,
$conf
[
'mysql'
][
'host'
],
$content
);
$content
=
str_replace
(
'{username}'
,
$conf
[
'mysql'
][
'admin_user'
],
$content
);
$content
=
str_replace
(
'{password}'
,
$conf
[
'mysql'
][
'admin_password'
],
$content
);
$content
=
str_replace
(
'{password}'
,
addslashes
(
$conf
[
'mysql'
][
'admin_password'
]
)
,
$content
);
wf
(
"
$install_dir
/server/lib/mysql_clientdb.conf"
,
$content
);
exec
(
'chmod 600 '
.
"
$install_dir
/server/lib/mysql_clientdb.conf"
);
exec
(
'chown root:root '
.
"
$install_dir
/server/lib/mysql_clientdb.conf"
);
...
...
install/dist/lib/opensuse.lib.php
View file @
67fedede
...
...
@@ -1366,7 +1366,7 @@ class installer_dist extends installer_base {
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/mysql_clientdb.conf.master'
,
"tpl/mysql_clientdb.conf.master"
);
$content
=
str_replace
(
'{hostname}'
,
$conf
[
'mysql'
][
'host'
],
$content
);
$content
=
str_replace
(
'{username}'
,
$conf
[
'mysql'
][
'admin_user'
],
$content
);
$content
=
str_replace
(
'{password}'
,
$conf
[
'mysql'
][
'admin_password'
],
$content
);
$content
=
str_replace
(
'{password}'
,
addslashes
(
$conf
[
'mysql'
][
'admin_password'
]
)
,
$content
);
wf
(
"
$install_dir
/server/lib/mysql_clientdb.conf"
,
$content
);
exec
(
'chmod 600 '
.
"
$install_dir
/server/lib/mysql_clientdb.conf"
);
exec
(
'chown root:root '
.
"
$install_dir
/server/lib/mysql_clientdb.conf"
);
...
...
install/lib/installer_base.lib.php
View file @
67fedede
...
...
@@ -2218,7 +2218,7 @@ class installer_base {
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/mysql_clientdb.conf.master'
,
'tpl/mysql_clientdb.conf.master'
);
$content
=
str_replace
(
'{hostname}'
,
$conf
[
'mysql'
][
'host'
],
$content
);
$content
=
str_replace
(
'{username}'
,
$conf
[
'mysql'
][
'admin_user'
],
$content
);
$content
=
str_replace
(
'{password}'
,
$conf
[
'mysql'
][
'admin_password'
],
$content
);
$content
=
str_replace
(
'{password}'
,
addslashes
(
$conf
[
'mysql'
][
'admin_password'
]
)
,
$content
);
wf
(
$install_dir
.
'/server/lib/mysql_clientdb.conf'
,
$content
);
chmod
(
$install_dir
.
'/server/lib/mysql_clientdb.conf'
,
0600
);
chown
(
$install_dir
.
'/server/lib/mysql_clientdb.conf'
,
'root'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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