Plugin Directory

Changeset 3103137


Ignore:
Timestamp:
06/15/2024 05:03:05 PM (21 months ago)
Author:
3UU
Message:

removed Reddit from the share counts; fix to avoid unauthenticated local file inclusion (with many thanks to haidv35)

Location:
shariff
Files:
3 edited
35 copied

Legend:

Unmodified
Added
Removed
  • shariff/tags/4.6.14/admin/admin-menu.php

    r3069111 r3103137  
    1313
    1414// Set services that have a share count API / backend.
    15 $shariff3uu_services_backend = array( 'facebook', 'pinterest', 'reddit', 'tumblr', 'vk', 'odnoklassniki', 'buffer' );
     15#$shariff3uu_services_backend = array( 'facebook', 'pinterest', 'reddit', 'tumblr', 'vk', 'odnoklassniki', 'buffer' );
     16$shariff3uu_services_backend = array( 'facebook', 'pinterest', 'tumblr', 'vk', 'odnoklassniki', 'buffer' );
    1617
    1718// Adds the actions for the admin page.
  • shariff/tags/4.6.14/readme.txt

    r3069111 r3103137  
    55Requires PHP: 7.4
    66Tested up to: 6.5
    7 Stable tag: 4.6.13
     7Stable tag: 4.6.14
    88License: MIT
    99License URI: http://opensource.org/licenses/mit
     
    145145
    146146== Changelog ==
     147= 4.6.14 =
     148- removed Reddit from the share counts because requests without API keys are
     149blocked now
     150- fix to avoid unauthenticated local file inclusion. Many thanks to haidv35
     151
    147152= 4.6.13 =
    148153- cleanup code (please check the basic options menu. We changed some
  • shariff/tags/4.6.14/shariff.php

    r3069111 r3103137  
    3535function shariff3uu_update() {
    3636    // Adjust code version.
    37     $code_version = '4.6.13';
     37    $code_version = '4.6.14';
    3838
    3939    // Get basic options.
     
    403403    $share_counts = array();
    404404
     405    // what are valid service names for the include?
     406    $valid_services= explode( '|', $shariff3uu['services'] );
     407   
    405408    // Loop through all desired services.
    406409    foreach ( $service_array as $service ) {
     410        // include/execute only valid services
     411        if ( !in_array( $service , $valid_services, true )===true ) continue;
     412
    407413        // Only include services that are not disabled.
    408414        if ( ! empty( $service ) && ( ! isset( $shariff3uu['disable'][ $service ] ) || ( isset( $shariff3uu['disable'][ $service ] ) && 0 === $shariff3uu['disable'][ $service ] ) ) ) {
     
    531537
    532538/** Registers activation hook to start cron job after an update. */
    533 register_activation_hook( __FILE__, 'shariff3uu_fill_cache_schedule' );
     539register_activation_hook( __FILE__ , 'shariff3uu_fill_cache_schedule' );
    534540
    535541/**
     
    15871593    }
    15881594}
    1589 register_deactivation_hook( __FILE__, 'shariff3uu_deactivate' );
     1595register_deactivation_hook( __FILE__ , 'shariff3uu_deactivate' );
    15901596
    15911597/**
  • shariff/trunk/admin/admin-menu.php

    r3069111 r3103137  
    1313
    1414// Set services that have a share count API / backend.
    15 $shariff3uu_services_backend = array( 'facebook', 'pinterest', 'reddit', 'tumblr', 'vk', 'odnoklassniki', 'buffer' );
     15#$shariff3uu_services_backend = array( 'facebook', 'pinterest', 'reddit', 'tumblr', 'vk', 'odnoklassniki', 'buffer' );
     16$shariff3uu_services_backend = array( 'facebook', 'pinterest', 'tumblr', 'vk', 'odnoklassniki', 'buffer' );
    1617
    1718// Adds the actions for the admin page.
  • shariff/trunk/readme.txt

    r3069111 r3103137  
    55Requires PHP: 7.4
    66Tested up to: 6.5
    7 Stable tag: 4.6.13
     7Stable tag: 4.6.14
    88License: MIT
    99License URI: http://opensource.org/licenses/mit
     
    145145
    146146== Changelog ==
     147= 4.6.14 =
     148- removed Reddit from the share counts because requests without API keys are
     149blocked now
     150- fix to avoid unauthenticated local file inclusion. Many thanks to haidv35
     151
    147152= 4.6.13 =
    148153- cleanup code (please check the basic options menu. We changed some
  • shariff/trunk/shariff.php

    r3069111 r3103137  
    3535function shariff3uu_update() {
    3636    // Adjust code version.
    37     $code_version = '4.6.13';
     37    $code_version = '4.6.14';
    3838
    3939    // Get basic options.
     
    403403    $share_counts = array();
    404404
     405    // what are valid service names for the include?
     406    $valid_services= explode( '|', $shariff3uu['services'] );
     407   
    405408    // Loop through all desired services.
    406409    foreach ( $service_array as $service ) {
     410        // include/execute only valid services
     411        if ( !in_array( $service , $valid_services, true )===true ) continue;
     412
    407413        // Only include services that are not disabled.
    408414        if ( ! empty( $service ) && ( ! isset( $shariff3uu['disable'][ $service ] ) || ( isset( $shariff3uu['disable'][ $service ] ) && 0 === $shariff3uu['disable'][ $service ] ) ) ) {
     
    531537
    532538/** Registers activation hook to start cron job after an update. */
    533 register_activation_hook( __FILE__, 'shariff3uu_fill_cache_schedule' );
     539register_activation_hook( __FILE__ , 'shariff3uu_fill_cache_schedule' );
    534540
    535541/**
     
    15871593    }
    15881594}
    1589 register_deactivation_hook( __FILE__, 'shariff3uu_deactivate' );
     1595register_deactivation_hook( __FILE__ , 'shariff3uu_deactivate' );
    15901596
    15911597/**
Note: See TracChangeset for help on using the changeset viewer.