Plugin Directory

Changeset 3479512


Ignore:
Timestamp:
03/10/2026 08:21:55 PM (3 weeks ago)
Author:
openvideo
Message:

Support password-protected channel cookie

Location:
open-video/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • open-video/trunk/OpenVideoNamespace/Channels.php

    r3463838 r3479512  
    3434    );
    3535
     36    private static function openvideoplugin_is_cookie_allowed(string $name): bool {
     37        $lower = strtolower($name);
     38        if (isset(self::OPENVIDEOPLUGIN_ALLOWED_COOKIES[$lower])) {
     39            return true;
     40        }
     41        // Allow ov_ch_auth_<integer> (dynamic channel auth cookie)
     42        return (bool) preg_match('/^ov_ch_auth_\d+$/', $lower);
     43    }
     44
    3645    public static function openvideoplugin_get_channel_path() {
    3746        $path = get_option(self::OPENVIDEOPLUGIN_CHANNEL_PATH_OPTION, self::OPENVIDEOPLUGIN_DEFAULT_CHANNEL_PATH);
     
    232241                list($name, $value) = explode('=', $main_part, 2);
    233242                $name = trim($name);
    234                 if (!isset(self::OPENVIDEOPLUGIN_ALLOWED_COOKIES[strtolower($name)])) {
     243                if (!self::openvideoplugin_is_cookie_allowed($name)) {
    235244                    continue;
    236245                }
     
    388397                $main_part = array_shift($cookie_parts);
    389398                list($name, $value) = explode('=', $main_part, 2);
    390                 if(!isset(self::OPENVIDEOPLUGIN_ALLOWED_COOKIES[strtolower($name)])) {
     399                if (!self::openvideoplugin_is_cookie_allowed($name)) {
    391400                    continue; // not a supported cookie - skip
    392401                }
  • open-video/trunk/README.txt

    r3463838 r3479512  
    66Tested up to: 6.9
    77Requires PHP: 7.0
    8 Stable tag: 1.4.1
     8Stable tag: 1.4.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828== Changelog ==
     29= 1.4.2 =
     30* Support channel authentication cookie for password-protected channels
     31
    2932= 1.4.1 =
    3033* Reverted 1.4.0 changes due to an issue affecting functionality
  • open-video/trunk/open-video.php

    r3463838 r3479512  
    1616 *
    1717 * @link              https://open.video/
    18  * @since             1.4.1
     18 * @since             1.4.2
    1919 * @package           Open.Video
    2020 *
     
    2323 * Plugin URI:        https://wordpress.org/plugins/open-video
    2424 * Description:       Open.Video allows you to easily embed videos to your site from the Open.Video Network.
    25  * Version:           1.4.1
     25 * Version:           1.4.2
    2626 * Requires at least: 6.1
    2727 * Requires PHP: 7.0
     
    4141 * Rename this for your plugin and update it as you release new versions.
    4242 */
    43 define('OPENVIDEOPLUGIN_VERSION', '1.4.1');
     43define('OPENVIDEOPLUGIN_VERSION', '1.4.2');
    4444
    4545global $openvideoplugin_regex;
Note: See TracChangeset for help on using the changeset viewer.