Skip to content

Commit e819202

Browse files
authored
Hide information_scheme database on default (hestiacp#2609)
* Hide information_scheme database on default * Add update existing servers
1 parent 95d758d commit e819202

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

install/deb/phpmyadmin/pma.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ echo "\$cfg['Servers'][\$i]['tracking'] = 'pma__tracking';" >> $pmapath
4141
echo "\$cfg['Servers'][\$i]['table_coords'] = 'pma__table_coords';" >> $pmapath
4242
echo "\$cfg['Servers'][\$i]['pdf_pages'] = 'pma__pdf_pages';" >> $pmapath
4343
echo "\$cfg['Servers'][\$i]['designer_coords'] = 'pma__designer_coords';" >> $pmapath
44+
echo "\$cfg['Servers'][\$i]['hide_db'] = 'information_schema';" >> $pmapath
4445

4546
#SOME WORK with DATABASE (table / user)
4647
PMADB=phpmyadmin

install/upgrade/versions/1.6.0.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,13 @@ fi
9393
if [ -f "/etc/cron.d/hestia-sftp" ]; then
9494
rm /etc/cron.d/hestia-sftp
9595
echo "@reboot root sleep 60 && /usr/local/hestia/bin/v-add-sys-sftp-jail > /dev/null" > /etc/cron.d/hestia-sftp
96+
fi
97+
98+
if [ -d /etc/phpmyadmin/conf.d ]; then
99+
for file in /etc/phpmyadmin/conf.d/*; do
100+
if [ -z $(cat $file | grep 'information_schema') ]; then
101+
echo "[ * ] Update phpMyAdmin server configuration"
102+
echo "\$cfg['Servers'][\$i]['hide_db'] = 'information_schema';" >> $file
103+
fi
104+
done
96105
fi

0 commit comments

Comments
 (0)