Zugangsdaten nur noch aus restricted/mysql.php, Datei nicht mehr versioniert
authServer.php und ajax/getForecastData.php hatten Server, Benutzer, Passwort und Datenbank noch einmal fest eingetragen und damit die Werte ueberschrieben, die restricted/mysql.php ohnehin liefert. Beide Dateien binden die Konfiguration bereits ein; die Doppelung ist entfallen. getForecastData.php benutzt jetzt $mysql_solarUser/-Pass/-DB wie die uebrigen Endpunkte, statt dieselben Werte unter den generischen Namen zu setzen. restricted/mysql.php steht jetzt in .gitignore, restricted/mysql.php.example dient als Vorlage fuer neue Arbeitskopien. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+50
-49
@@ -1,49 +1,50 @@
|
|||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
*.so
|
*.so
|
||||||
.Python
|
.Python
|
||||||
build/
|
build/
|
||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
dist/
|
||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
lib/
|
||||||
lib64/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
var/
|
var/
|
||||||
wheels/
|
wheels/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
.installed.cfg
|
.installed.cfg
|
||||||
*.egg
|
*.egg
|
||||||
|
|
||||||
# Virtual Environment
|
# Virtual Environment
|
||||||
venv/
|
venv/
|
||||||
ENV/
|
ENV/
|
||||||
env/
|
env/
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
*~
|
*~
|
||||||
|
|
||||||
# Konfiguration (enthält Credentials!)
|
# Konfiguration (enthält Credentials!)
|
||||||
config.ini
|
config.ini
|
||||||
|
restricted/mysql.php
|
||||||
# Logs
|
|
||||||
*.log
|
# Logs
|
||||||
logs/
|
*.log
|
||||||
|
logs/
|
||||||
# Betriebssystem
|
|
||||||
.DS_Store
|
# Betriebssystem
|
||||||
Thumbs.db
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
# Temporäre Dateien
|
|
||||||
*.tmp
|
# Temporäre Dateien
|
||||||
*.bak
|
*.tmp
|
||||||
*.backup
|
*.bak
|
||||||
|
*.backup
|
||||||
|
|||||||
@@ -43,11 +43,7 @@ $linecolors["Vorhersage"] = "#4444FF";
|
|||||||
|
|
||||||
|
|
||||||
if (checkLogin()) {
|
if (checkLogin()) {
|
||||||
$mysql_server = "localhost:3310";
|
$mysql = new mysqli($mysql_server, $mysql_solarUser, $mysql_solarPass, $mysql_solarDB);
|
||||||
$mysql_user = "solarLog";
|
|
||||||
$mysql_pass = "ENTFERNT_MYSQL_SOLARPASS";
|
|
||||||
$mysql_db = "solarLog";
|
|
||||||
$mysql = new mysqli($mysql_server, $mysql_user, $mysql_pass, $mysql_db);
|
|
||||||
$consEst = mysqli_query($mysql, $consEstQuery);
|
$consEst = mysqli_query($mysql, $consEstQuery);
|
||||||
$prodEst = mysqli_query($mysql,$prodEstQuery);
|
$prodEst = mysqli_query($mysql,$prodEstQuery);
|
||||||
$prodReal = mysqli_query($mysql,$prodRealQuery);
|
$prodReal = mysqli_query($mysql,$prodRealQuery);
|
||||||
|
|||||||
@@ -215,10 +215,6 @@ try {
|
|||||||
// looking up correspondending public key of the credential id
|
// looking up correspondending public key of the credential id
|
||||||
// you should also validate that only ids of the given user name
|
// you should also validate that only ids of the given user name
|
||||||
// are taken for the login.
|
// are taken for the login.
|
||||||
$mysql_server = "localhost:3310";
|
|
||||||
$mysql_user = "Logins";
|
|
||||||
$mysql_pass = "ENTFERNT_MYSQL_PASS";
|
|
||||||
$mysql_db = "Logins";
|
|
||||||
$mysql = new mysqli($mysql_server,$mysql_user,$mysql_pass,$mysql_db);
|
$mysql = new mysqli($mysql_server,$mysql_user,$mysql_pass,$mysql_db);
|
||||||
$result = mysqli_query($mysql,"SELECT credentialPublicKey, userId, name FROM users WHERE credentialId = '".base64_encode($id)."';");
|
$result = mysqli_query($mysql,"SELECT credentialPublicKey, userId, name FROM users WHERE credentialId = '".base64_encode($id)."';");
|
||||||
if(!$result){
|
if(!$result){
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Vorlage. Kopieren nach restricted/mysql.php und ausfuellen.
|
||||||
|
* Die echte Datei ist bewusst nicht versioniert (.gitignore).
|
||||||
|
*/
|
||||||
|
$mysql_server = "";
|
||||||
|
$mysql_user = "";
|
||||||
|
$mysql_pass = "";
|
||||||
|
$mysql_db = "";
|
||||||
|
$mysql_solarUser = "";
|
||||||
|
$mysql_solarPass = "";
|
||||||
|
$mysql_solarDB = "";
|
||||||
|
$mysql_MeshUser = "";
|
||||||
|
$mysql_MeshPass = "";
|
||||||
|
$mysql_MeshDB = "";
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user