fix(security): secure Adminer wrapper, hide credentials from URL, auto-fill TCP 127.0.0.1 and disable in production (task-d095b0e23b)
This commit is contained in:
parent
71fc4efb47
commit
2f27659f99
4302
public/adminer-core.php
Normal file
4302
public/adminer-core.php
Normal file
File diff suppressed because it is too large
Load Diff
4384
public/adminer.php
4384
public/adminer.php
File diff suppressed because it is too large
Load Diff
|
|
@ -17,6 +17,13 @@ sudo -u postgres psql -c "CREATE USER netgescon WITH PASSWORD 'netgescon_pass';"
|
|||
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE netgescon TO netgescon;" || true
|
||||
sudo -u postgres psql -d netgescon -c "GRANT ALL ON SCHEMA public TO netgescon;" || true
|
||||
|
||||
# 3.1 Configurazione pg_hba.conf per consentire password auth sia su socket locale che TCP 127.0.0.1
|
||||
PG_HBA=$(find /etc/postgresql/ -name "pg_hba.conf" | head -n 1)
|
||||
if [ -n "$PG_HBA" ] && [ -f "$PG_HBA" ]; then
|
||||
sed -i -E 's/local\s+all\s+all\s+peer/local all all scram-sha-256/' "$PG_HBA" || true
|
||||
systemctl reload postgresql || true
|
||||
fi
|
||||
|
||||
# 4. Riavvio eventuale servizio PHP-FPM / Web server
|
||||
systemctl restart php*-fpm 2>/dev/null || true
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user