]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - connection.php
Try to be helpful if someone mixes wrong secrets::key with (old) DB unrealircd::rpc_p...
[irc/unrealircd/unrealircd-webpanel.git] / connection.php
index 287f2b314f75b5c241baf2e61d426435b8c4d883..44ec03421d63a515e38910dc26202d9f0ae187a5 100644 (file)
@@ -14,8 +14,11 @@ function connect_to_ircd()
        if (str_starts_with($rpc_password, "secret:"))
                $rpc_password = secret_decrypt($rpc_password);
 
-       if (!$host || !$port || !$rpc_user || !$rpc_password)
+       if (!$host || !$port || !$rpc_user)
                die("Unable to find RPC credentials in your config.php");
+       if ($rpc_password === null)
+               die("Your RPC password in the DB was encrypted with a different key than config/config.php contains.<br>\n".
+                   "Either restore your previous config/config.php or start with a fresh database.<br>\n");
 
        $tls_verify = get_config("unrealircd::tls_verify_cert");