mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(databases): keep the server password of existing Redis databases
v4.3.23 started Redis with the stored REDIS_PASSWORD value as it is and unquoted, and the connection URLs used the same value. 4.4.0 resolved a shared variable reference for the start command only, so after the first restart the server password changed and no longer matched the URLs. - Add legacy_password_quoting to standalone_redis; existing databases keep the v4.3.23 server password - New databases resolve REDIS_PASSWORD (local, shared or remote secret) and quote it in the start command - Connection URLs use the same password as the server - Hide the flag in the API, as for KeyDB and Dragonfly
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Until v4.3.23, the Redis start command and connection URLs used the stored REDIS_PASSWORD value
|
||||
* as it is (a shared variable reference stayed text) and the command did not quote it. Existing
|
||||
* databases keep that server password; databases created later resolve and quote it.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('standalone_redis', function (Blueprint $table) {
|
||||
$table->boolean('legacy_password_quoting')->default(false);
|
||||
});
|
||||
|
||||
DB::table('standalone_redis')->update(['legacy_password_quoting' => true]);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('standalone_redis', function (Blueprint $table) {
|
||||
$table->dropColumn('legacy_password_quoting');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user