From 28ff4a95354000390660a6f807ae4d1552b12025 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Mon, 12 Oct 2026 06:58:58 +0530 Subject: [PATCH] fix(clone): mask the other site's credentials in logged clone and sync commands The site details read from the source or destination (ee site info --format=json) hold its database and admin passwords, which go into the database copy commands. They are now registered with EE::obfuscate() when core provides it. --- src/clone/Cloner.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/clone/Cloner.php b/src/clone/Cloner.php index b074343e..d1fcb611 100644 --- a/src/clone/Cloner.php +++ b/src/clone/Cloner.php @@ -378,6 +378,10 @@ function set_site_details(): void { throw new \Exception( 'Unable to get info for site ' . $this->name ); } $this->validate_site_details( $details ); + // The credentials go into the database copy commands, which are logged. + if ( method_exists( 'EE', 'obfuscate' ) ) { + EE::obfuscate( array_intersect_key( $details, array_flip( [ 'db_password', 'db_root_password', 'app_admin_password' ] ) ) ); + } $this->site_details = $details; }