From b6363d847449ab578cf6450d1f8fc577c4bdabcb Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Fri, 17 Apr 2026 22:44:53 +0700 Subject: [PATCH] fix: add Cloudflare AI token to encryption list in sanitize_field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The $encrypted array was missing prautoblogger_cloudflare_ai_token, so saving through the admin UI stored plaintext while the read path called decrypt() — which would fail on non-encrypted data. Co-Authored-By: Claude Opus 4.6 --- includes/admin/class-admin-page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-admin-page.php b/includes/admin/class-admin-page.php index f62c4bb..328ff55 100755 --- a/includes/admin/class-admin-page.php +++ b/includes/admin/class-admin-page.php @@ -240,7 +240,7 @@ class PRAutoBlogger_Admin_Page { $option_name = substr( $filter, strlen( 'sanitize_option_' ) ); } - $encrypted = [ 'prautoblogger_openrouter_api_key', 'prautoblogger_ga4_credentials_json' ]; + $encrypted = [ 'prautoblogger_openrouter_api_key', 'prautoblogger_ga4_credentials_json', 'prautoblogger_cloudflare_ai_token' ]; if ( in_array( $option_name, $encrypted, true ) ) { // Empty value means password field wasn't touched — keep existing. if ( '' === $value ) {