Plugin Directory

Changeset 3306672


Ignore:
Timestamp:
06/04/2025 06:50:36 PM (10 months ago)
Author:
teamwpminiorange
Message:

Release social login version 7.7.0

Location:
miniorange-login-openid
Files:
286 added
3 edited

Legend:

Unmodified
Added
Removed
  • miniorange-login-openid/trunk/miniorange_openid_sso_settings.php

    r3297954 r3306672  
    55 * Plugin URI: https://www.miniorange.com
    66 * Description: Allow your users to login, comment and share with Facebook, Google, Apple, Twitter, LinkedIn etc using customizable buttons.
    7  * Version: 7.6.10
     7 * Version: 7.7.0
    88 * Author: <a href="https://www.miniorange.com/">miniOrange</a>
    99 * License: Expat
     
    1111 */
    1212
    13 define( 'MO_OPENID_SOCIAL_LOGIN_VERSION', '7.6.10' );
     13define( 'MO_OPENID_SOCIAL_LOGIN_VERSION', '7.7.0' );
    1414define( 'PLUGIN_URL', esc_url( plugin_dir_url( __FILE__ ) ) . 'includes/images/icons/' );
    1515define( 'MOSL_PLUGIN_DIR', str_replace( '/', '\\', plugin_dir_path( __FILE__ ) ) );
  • miniorange-login-openid/trunk/mo-openid-social-login-functions.php

    r2999714 r3306672  
    3737}
    3838
     39// Whitelist of allowed social apps
     40function mo_openid_get_allowed_social_apps() {
     41    return array(
     42        'amazon',
     43        'apple',
     44        'baidu',
     45        'discord',
     46        'dribbble',
     47        'disqus',
     48        'dropbox',
     49        'facebook',
     50        'flickr',
     51        'fitbit',
     52        'foursquare',
     53        'github',
     54        'gitlab',
     55        'google',
     56        'hubspot',
     57        'instagram',
     58        'kakao',
     59        'line',
     60        'linkedin',
     61        'linkedin_oidc',
     62        'livejournal',
     63        'mailchimp',
     64        'mailru',
     65        'meetup',
     66        'naver',
     67        'odnoklassniki',
     68        'paypal',
     69        'pinterest',
     70        'qq',
     71        'reddit',
     72        'renren',
     73        'salesforce',
     74        'slack',
     75        'snapchat',
     76        'spotify',
     77        'stackexchange',
     78        'stackoverflow',
     79        'steam',
     80        'strava',
     81        'teamsnap',
     82        'trello',
     83        'tumblr',
     84        'twitch',
     85        'twitter',
     86        'vimeo',
     87        'vkontakte',
     88        'wechat',
     89        'wiebo',
     90        'windowslive',
     91        'wordpress',
     92        'yahoo',
     93        'yandex',
     94        'youtube',
     95        'zoom'
     96    );
     97}
     98
     99function mo_openid_validate_social_app($appname) {
     100    $allowed_apps = mo_openid_get_allowed_social_apps();
     101    return in_array(strtolower($appname), $allowed_apps);
     102}
     103
    39104function mo_openid_custom_app_oauth_redirect( $appname ) {
     105    if (!mo_openid_validate_social_app($appname)) {
     106        wp_die('Invalid social app specified.');
     107    }
     108   
    40109    if ( isset( $_REQUEST['test'] ) ) {     // phpcs:ignore
    41110        setcookie( 'mo_oauth_test', true );
     
    91160        $appname = 'yahoo';
    92161    }
     162
     163    // Validate the appname against whitelist
     164    if (!mo_openid_validate_social_app($appname)) {
     165        wp_die('Invalid social app specified.');
     166    }
     167
    93168    require 'social_apps/' . $appname . '.php';
    94169    $mo_appname     = 'mo_' . $appname;
  • miniorange-login-openid/trunk/readme.txt

    r3297954 r3306672  
    55Requires at least: 2.0.2
    66Tested up to: 6.8
    7 Stable tag: 7.6.10
     7Stable tag: 7.7.0
    88Requires PHP: 5.4
    99License: Expat
     
    278278
    279279==Changelog==
     280= 7.7.0 =
     281* Added filter to appname to prevent potential LFI risk
     282
    280283= 7.6.10 =
    281284* Added compatibility with WP 6.8
     
    10541057
    10551058== Upgrade Notice ==
     1059= 7.7.0 =
     1060* Added filter to appname to prevent potential LFI risk
     1061
    10561062= 7.6.10 =
    10571063* Added compatibility with WP 6.8
Note: See TracChangeset for help on using the changeset viewer.