Plugin Directory

Changeset 3680121


Ignore:
Timestamp:
09/03/2026 05:09:05 PM (3 months ago)
Author:
strychni0x
Message:

Release 1.11.1: security fix – restrict notification link to same-origin

Location:
human2human-chess-duell
Files:
19 added
2 edited

Legend:

Unmodified
Added
Removed
  • human2human-chess-duell/trunk/human2human-chess-duell.php

    r3608279 r3680121  
    44 * Plugin URI:        https://github.com/strYchni0x/chess-duell
    55 * Description:        Two people play chess online against each other - just share a link. Number of simultaneous games and lifetime configurable in the backend. Server-side rule validation (no cheating possible), no AI. Embed with the shortcode [chess_duell].
    6  * Version:           1.11.0
     6 * Version:           1.11.1
    77 * Author:            Florian Willnat
    88 * License:           GPL-2.0-or-later
    … …  
    1616}
    1717
    18 define('CHESS_DUELL_VERSION', '1.11.0');
     18define('CHESS_DUELL_VERSION', '1.11.1');
    1919define('CHESS_DUELL_URL', plugin_dir_url(__FILE__));
    2020define('CHESS_DUELL_PATH', plugin_dir_path(__FILE__));
    … …  
    337337/** Link zur Partie (für die Benachrichtigung). */
    338338function chess_duell_game_link($game) {
    339     $base = !empty($game['page']) ? $game['page'] : home_url('/');
     339    $home = home_url('/');
     340    $base = !empty($game['page']) ? $game['page'] : $home;
     341    // Sicherheit: In Benachrichtigungs-Mails nur seiteneigene URLs zulassen. Das
     342    // page-Feld wird beim Erstellen einer Partie ungeprüft (nur esc_url_raw)
     343    // übernommen; ohne diese Prüfung könnte eine fremde Domain untergeschoben
     344    // werden und die Mail (vom vertrauenswürdigen Absender der Seite) zu einer
     345    // Phishing-Seite verlinken. Bei fremdem Host auf die Startseite zurückfallen.
     346    $base_host = wp_parse_url($base, PHP_URL_HOST);
     347    $home_host = wp_parse_url($home, PHP_URL_HOST);
     348    if (empty($base_host) || strcasecmp((string) $base_host, (string) $home_host) !== 0) {
     349        $base = $home;
     350    }
    340351    return add_query_arg('chess_game', rawurlencode($game['id']), $base);
    341352}
  • human2human-chess-duell/trunk/readme.txt

    r3658536 r3680121  
    55Tested up to: 7.1
    66Requires PHP: 7.2
    7 Stable tag: 1.11.0
     7Stable tag: 1.11.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7575== Changelog ==
    7676
     77= 1.11.1 =
     78* Security: turn-notification e-mails now always link to your own site. The optional per-game return URL is restricted to the site's own host, so a crafted game can no longer point the notification link at an external (phishing) domain. Already-stored games are covered too.
     79
    7780= 1.11.0 =
    7881* Internationalization: source strings are now English; a complete German translation (de_DE and de_DE_formal) is bundled.
Note: See TracChangeset for help on using the changeset viewer.