Plugin Directory

Changeset 3399154


Ignore:
Timestamp:
11/19/2025 05:16:05 PM (4 months ago)
Author:
Rustaurius
Message:

v2.3.16 released and tagged

Location:
business-profile
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • business-profile/tags/2.3.16/bpfwp-templates/contact-card.php

    r2891361 r3399154  
    112112    <?php
    113113    foreach ( $data as $data => $callback ) {
    114        
    115         $return_array = call_user_func( $callback, bpfwp_get_display( 'location' ) );
    116         if ( is_array( $return_array ) ) { $json_ld_data = array_merge_recursive( $json_ld_data, $return_array ); }
     114
     115        if ( is_callable( $callback ) && bpfwp_is_callback_allowed( $callback ) ) {
     116            $return_array = call_user_func( $callback, bpfwp_get_display( 'location' ) );
     117            if ( is_array( $return_array ) ) { $json_ld_data = array_merge_recursive( $json_ld_data, $return_array ); }
     118        }
    117119    }
    118120    ?>
  • business-profile/tags/2.3.16/business-profile.php

    r3366778 r3399154  
    44 * Plugin URI:  https://www.fivestarplugins.com/plugins/business-profile/
    55 * Description: Add schema structured data to any page or post type. Create an SEO friendly contact card with your business info and associated schema. Supports Google Map, opening hours and more.
    6  * Version:     2.3.15
     6 * Version:     2.3.16
    77 * Author:      Five Star Plugins
    88 * Author URI:  https://www.fivestarplugins.com
     
    112112            define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
    113113            define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
    114             define( 'BPFWP_VERSION', '2.3.15' );
     114            define( 'BPFWP_VERSION', '2.3.16' );
    115115        }
    116116
  • business-profile/tags/2.3.16/includes/template-functions.php

    r3324583 r3399154  
    12181218}
    12191219}
     1220
     1221if ( ! function_exists ( 'bpfwp_get_blacklisted_callbacks' ) ) {
     1222function bpfwp_get_blacklisted_callbacks() {
     1223
     1224    $dangerous_functions = array(
     1225        // Command execution / processes
     1226        'system',
     1227        'exec',
     1228        'shell_exec',
     1229        'passthru',
     1230        'proc_open',
     1231        'popen',
     1232        'pcntl_exec',
     1233   
     1234        // Dynamic code / evaluation
     1235        'eval',             // not used as a callback, but block name anyway
     1236        'assert',
     1237        'create_function',
     1238   
     1239        // File read/write
     1240        'file_get_contents',
     1241        'file_put_contents',
     1242        'fopen',
     1243        'fwrite',
     1244        'fputs',
     1245        'fprintf',
     1246        'ftruncate',
     1247        'unlink',
     1248        'copy',
     1249        'rename',
     1250        'rmdir',
     1251        'mkdir',
     1252        'scandir',
     1253        'glob',
     1254        'readfile',
     1255        'file',             // reads entire file into array
     1256        'move_uploaded_file',
     1257        'chmod',
     1258        'chown',
     1259        'chgrp',
     1260        'symlink',
     1261        'link',
     1262        'tempnam',
     1263   
     1264        // Network / sockets / external calls
     1265        'fsockopen',
     1266        'pfsockopen',
     1267        'curl_exec',
     1268        'curl_multi_exec',
     1269        'stream_socket_client',
     1270        'stream_socket_server',
     1271   
     1272        // Environment manipulation / mail (optional, but often sensitive)
     1273        'putenv',
     1274        'apache_setenv',
     1275        'mail',
     1276    );
     1277
     1278    return $dangerous_functions;
     1279}
     1280}
     1281
     1282
     1283if ( ! function_exists ( 'bpfwp_is_callback_allowed' ) ) {
     1284function bpfwp_is_callback_allowed( $callback ) {
     1285    $dangerous_functions = bpfwp_get_blacklisted_callbacks();
     1286
     1287    // Disallow closures entirely (you can't inspect them safely)
     1288    if ( $callback instanceof Closure ) {
     1289        return false;
     1290    }
     1291
     1292    // Simple function name
     1293    if ( is_string( $callback ) ) {
     1294        $name = strtolower( ltrim( $callback, '\\' ) );
     1295        return ! in_array( $name, $dangerous_functions, true );
     1296    }
     1297
     1298    // Array callback: [object|string, 'method']
     1299    if ( is_array( $callback ) && count( $callback ) === 2 ) {
     1300        $method = strtolower( $callback[1] );
     1301
     1302        // Optionally reuse same list for methods
     1303        if ( in_array( $method, $dangerous_functions, true ) ) {
     1304            return false;
     1305        }
     1306
     1307        // Optional: block certain classes / namespaces
     1308        if ( is_string( $callback[0] ) ) {
     1309            $class = ltrim( $callback[0], '\\' );
     1310            // Example: disallow callbacks from some class
     1311            // if ( $class === 'DangerousClass' ) return false;
     1312        }
     1313
     1314        return true;
     1315    }
     1316
     1317    return false;
     1318}
     1319}
  • business-profile/tags/2.3.16/readme.txt

    r3366778 r3399154  
    66Tested Up To: 6.8
    77Tags: business profile, seo, local seo, schema, address, google map, contact, phone, contact card, vcard, contact info, business location, business address, business map, business schema, organization schema, corporation schema, contact schema, address schema, location schema, map schema, business structured data, business microdata, address microdata, location structured data, location microdata, contact shortcode, location shortcode, address shortcode, schema shortcode, gutenberg schema, gutenberg address
    8 Stable tag: 2.3.15
     8Stable tag: 2.3.16
    99License: GPLv3
    1010License URI:http://www.gnu.org/licenses/gpl-3.0.html
     
    237237== Changelog ==
    238238
     239= 2.3.16 (2025-11-19) =
     240- Patch for reported Patchstack vulnerability.
     241
    239242= 2.3.15 (2025-09-23) =
    240243- Updated admin notice capabilities
  • business-profile/trunk/bpfwp-templates/contact-card.php

    r2891361 r3399154  
    112112    <?php
    113113    foreach ( $data as $data => $callback ) {
    114        
    115         $return_array = call_user_func( $callback, bpfwp_get_display( 'location' ) );
    116         if ( is_array( $return_array ) ) { $json_ld_data = array_merge_recursive( $json_ld_data, $return_array ); }
     114
     115        if ( is_callable( $callback ) && bpfwp_is_callback_allowed( $callback ) ) {
     116            $return_array = call_user_func( $callback, bpfwp_get_display( 'location' ) );
     117            if ( is_array( $return_array ) ) { $json_ld_data = array_merge_recursive( $json_ld_data, $return_array ); }
     118        }
    117119    }
    118120    ?>
  • business-profile/trunk/business-profile.php

    r3366778 r3399154  
    44 * Plugin URI:  https://www.fivestarplugins.com/plugins/business-profile/
    55 * Description: Add schema structured data to any page or post type. Create an SEO friendly contact card with your business info and associated schema. Supports Google Map, opening hours and more.
    6  * Version:     2.3.15
     6 * Version:     2.3.16
    77 * Author:      Five Star Plugins
    88 * Author URI:  https://www.fivestarplugins.com
     
    112112            define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
    113113            define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
    114             define( 'BPFWP_VERSION', '2.3.15' );
     114            define( 'BPFWP_VERSION', '2.3.16' );
    115115        }
    116116
  • business-profile/trunk/includes/template-functions.php

    r3324583 r3399154  
    12181218}
    12191219}
     1220
     1221if ( ! function_exists ( 'bpfwp_get_blacklisted_callbacks' ) ) {
     1222function bpfwp_get_blacklisted_callbacks() {
     1223
     1224    $dangerous_functions = array(
     1225        // Command execution / processes
     1226        'system',
     1227        'exec',
     1228        'shell_exec',
     1229        'passthru',
     1230        'proc_open',
     1231        'popen',
     1232        'pcntl_exec',
     1233   
     1234        // Dynamic code / evaluation
     1235        'eval',             // not used as a callback, but block name anyway
     1236        'assert',
     1237        'create_function',
     1238   
     1239        // File read/write
     1240        'file_get_contents',
     1241        'file_put_contents',
     1242        'fopen',
     1243        'fwrite',
     1244        'fputs',
     1245        'fprintf',
     1246        'ftruncate',
     1247        'unlink',
     1248        'copy',
     1249        'rename',
     1250        'rmdir',
     1251        'mkdir',
     1252        'scandir',
     1253        'glob',
     1254        'readfile',
     1255        'file',             // reads entire file into array
     1256        'move_uploaded_file',
     1257        'chmod',
     1258        'chown',
     1259        'chgrp',
     1260        'symlink',
     1261        'link',
     1262        'tempnam',
     1263   
     1264        // Network / sockets / external calls
     1265        'fsockopen',
     1266        'pfsockopen',
     1267        'curl_exec',
     1268        'curl_multi_exec',
     1269        'stream_socket_client',
     1270        'stream_socket_server',
     1271   
     1272        // Environment manipulation / mail (optional, but often sensitive)
     1273        'putenv',
     1274        'apache_setenv',
     1275        'mail',
     1276    );
     1277
     1278    return $dangerous_functions;
     1279}
     1280}
     1281
     1282
     1283if ( ! function_exists ( 'bpfwp_is_callback_allowed' ) ) {
     1284function bpfwp_is_callback_allowed( $callback ) {
     1285    $dangerous_functions = bpfwp_get_blacklisted_callbacks();
     1286
     1287    // Disallow closures entirely (you can't inspect them safely)
     1288    if ( $callback instanceof Closure ) {
     1289        return false;
     1290    }
     1291
     1292    // Simple function name
     1293    if ( is_string( $callback ) ) {
     1294        $name = strtolower( ltrim( $callback, '\\' ) );
     1295        return ! in_array( $name, $dangerous_functions, true );
     1296    }
     1297
     1298    // Array callback: [object|string, 'method']
     1299    if ( is_array( $callback ) && count( $callback ) === 2 ) {
     1300        $method = strtolower( $callback[1] );
     1301
     1302        // Optionally reuse same list for methods
     1303        if ( in_array( $method, $dangerous_functions, true ) ) {
     1304            return false;
     1305        }
     1306
     1307        // Optional: block certain classes / namespaces
     1308        if ( is_string( $callback[0] ) ) {
     1309            $class = ltrim( $callback[0], '\\' );
     1310            // Example: disallow callbacks from some class
     1311            // if ( $class === 'DangerousClass' ) return false;
     1312        }
     1313
     1314        return true;
     1315    }
     1316
     1317    return false;
     1318}
     1319}
  • business-profile/trunk/readme.txt

    r3366778 r3399154  
    66Tested Up To: 6.8
    77Tags: business profile, seo, local seo, schema, address, google map, contact, phone, contact card, vcard, contact info, business location, business address, business map, business schema, organization schema, corporation schema, contact schema, address schema, location schema, map schema, business structured data, business microdata, address microdata, location structured data, location microdata, contact shortcode, location shortcode, address shortcode, schema shortcode, gutenberg schema, gutenberg address
    8 Stable tag: 2.3.15
     8Stable tag: 2.3.16
    99License: GPLv3
    1010License URI:http://www.gnu.org/licenses/gpl-3.0.html
     
    237237== Changelog ==
    238238
     239= 2.3.16 (2025-11-19) =
     240- Patch for reported Patchstack vulnerability.
     241
    239242= 2.3.15 (2025-09-23) =
    240243- Updated admin notice capabilities
Note: See TracChangeset for help on using the changeset viewer.