Zugangsdaten aus dem Code in die externe Config verschoben
SMTP-Passwoerter (mail_attachment), der MySQL-Zugang von stats.php und die Schluessel fuer OpenWeatherMap und Aeris standen im Klartext im Code. Sie kommen jetzt aus der externen Config ($smtp_konten, $stats_mysql_*, $openweathermap_appid, $aeris_client_*). rebuild-settings.php legt die Eintraege bei der Ersteinrichtung leer an. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,15 @@ if(!file_put_contents (CONFIG_PATH.CONFIG_FILE,
|
||||
global $firma;
|
||||
global $dbconn;
|
||||
global $geodbconn;
|
||||
|
||||
global $smtp_konten;
|
||||
global $stats_mysql_server;
|
||||
global $stats_mysql_user;
|
||||
global $stats_mysql_pw;
|
||||
global $stats_mysql_db;
|
||||
global $openweathermap_appid;
|
||||
global $aeris_client_id;
|
||||
global $aeris_client_secret;
|
||||
|
||||
$instanz = '.var_export(INSTANZ, true).';
|
||||
$dbconn = 0;
|
||||
$geodbconn = 0;
|
||||
@@ -40,6 +48,18 @@ if(!file_put_contents (CONFIG_PATH.CONFIG_FILE,
|
||||
$mysql_server = '.configWert("mysqlserver").';
|
||||
$mysql_opengeodb = '.configWert("opengeodb").';
|
||||
$firma = '.configWert("firma", true).';
|
||||
|
||||
// Von Hand zu pflegen: SMTP-Zugänge je Firma, "*" für alle übrigen
|
||||
$smtp_konten = array(
|
||||
"*" => array("user" => "", "pw" => ""),
|
||||
);
|
||||
$stats_mysql_server = "localhost";
|
||||
$stats_mysql_user = "";
|
||||
$stats_mysql_pw = "";
|
||||
$stats_mysql_db = "systemstats";
|
||||
$openweathermap_appid = "";
|
||||
$aeris_client_id = "";
|
||||
$aeris_client_secret = "";
|
||||
?>'))
|
||||
{
|
||||
$err= error("Konfiguration konnte nicht geschrieben werden!");
|
||||
|
||||
Reference in New Issue
Block a user