From cfd489d6382ed1e1badaec8f359962a4611919c0 Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Wed, 22 Jul 2026 14:48:09 +0000 Subject: [PATCH] fix: V-001 security vulnerability Automated security fix generated by OrbisAI Security --- lib/client-assets.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/client-assets.php b/lib/client-assets.php index 98fbf6d54..1a653242d 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -59,10 +59,12 @@ function novablocks_register_vendor_scripts() { wp_script_add_data( 'novablocks-velocity', 'crossorigin', 'anonymous' ); $google_maps_api_key = get_option( 'novablocks_google_maps_api_key', '' ); - wp_register_script( - 'google-maps', - '//maps.googleapis.com/maps/api/js?key=' . $google_maps_api_key . '&libraries=places' - ); + if ( ! empty( $google_maps_api_key ) ) { + wp_register_script( + 'google-maps', + '//maps.googleapis.com/maps/api/js?key=' . esc_attr( $google_maps_api_key ) . '&libraries=places' + ); + } // Comments related. /** The Rich Text Editor from Basecamp - Trix.