From 93a87a21b465f476e2350f7473ad6f7bcfa12b92 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Tue, 20 Oct 2026 09:23:58 +0530 Subject: [PATCH] fix(admin-tools): let phpRedisAdmin 1.27.0 serve behind the admin-tools auth phpRedisAdmin 1.27.0 answers every request with 403 unless a login, login_as_acl_auth or allow_no_auth is configured, and EasyEngine's config sets none of them, so /ee-admin/pra/ is a 403 on every install since that release. /ee-admin/ is already behind the admin-tools basic auth, so set allow_no_auth when no ADMIN_USER login is configured. Installs that already fetched 1.27.0 keep the old config file, so install() now rewrites the pra config when it differs from the template, as it already does for index.php. --- src/Admin_Tools_Command.php | 7 +++++++ templates/pra.config.mustache | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/Admin_Tools_Command.php b/src/Admin_Tools_Command.php index a8eec72..0754125 100644 --- a/src/Admin_Tools_Command.php +++ b/src/Admin_Tools_Command.php @@ -85,6 +85,13 @@ private function install() { if ( ! is_file( $index_file ) || file_get_contents( $index_file ) !== $index ) { $this->fs->dumpFile( $index_file, $index ); } + + // A phpRedisAdmin config written by an older release lacks allow_no_auth, which pra 1.27.0+ needs to serve. + $pra_config_file = ADMIN_TOOL_DIR . '/pra/includes/config.inc.php'; + $pra_config = file_get_contents( ADMIN_TEMPLATE_ROOT . '/pra.config.mustache' ); + if ( is_file( $pra_config_file ) && file_get_contents( $pra_config_file ) !== $pra_config ) { + $this->fs->dumpFile( $pra_config_file, $pra_config ); + } } /** diff --git a/templates/pra.config.mustache b/templates/pra.config.mustache index eafcec6..610952c 100644 --- a/templates/pra.config.mustache +++ b/templates/pra.config.mustache @@ -11,6 +11,9 @@ if (!empty($admin_user)) { 'password' => $admin_pass, ), ); +} else { + // phpRedisAdmin 1.27.0+ refuses to run without a login; /ee-admin/ is already behind EasyEngine's admin-tools basic auth. + $config['allow_no_auth'] = true; } $config['servers'] = array();