Fix security issue - remove actual database credentials from source code, use placeholders
This commit is contained in:
parent
e23a0546ac
commit
b60810080d
|
|
@ -37,9 +37,9 @@ $container->set('db', function () {
|
|||
}
|
||||
|
||||
$host = $_ENV['DB_HOST'] ?? $_SERVER['DB_HOST'] ?? getenv('DB_HOST') ?? 'localhost';
|
||||
$dbname = $_ENV['DB_NAME'] ?? $_SERVER['DB_NAME'] ?? getenv('DB_NAME') ?? 'rsshub';
|
||||
$username = $_ENV['DB_USER'] ?? $_SERVER['DB_USER'] ?? getenv('DB_USER') ?? 'rsshub';
|
||||
$password = $_ENV['DB_PASS'] ?? $_SERVER['DB_PASS'] ?? getenv('DB_PASS') ?? 'rsshub_moloko22';
|
||||
$dbname = $_ENV['DB_NAME'] ?? $_SERVER['DB_NAME'] ?? getenv('DB_NAME') ?? 'your_database_name';
|
||||
$username = $_ENV['DB_USER'] ?? $_SERVER['DB_USER'] ?? getenv('DB_USER') ?? 'your_database_user';
|
||||
$password = $_ENV['DB_PASS'] ?? $_SERVER['DB_PASS'] ?? getenv('DB_PASS') ?? 'your_secure_password';
|
||||
|
||||
$dsn = "mysql:host=$host;dbname=$dbname;charset=utf8mb4";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue