Plugin Directory

Changeset 2942090

Timestamp:
07/23/2023 12:59:44 PM (13 months ago)
Author:
ayeshrajans
Message:

Add v1.4

Location:
comment-form-csrf-protection
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • comment-form-csrf-protection/trunk/comment-form-csrf-protection.php

    r2497192 r2942090  
    44Plugin URI: https://wordpress.org/plugins/comment-form-csrf-protection
    55Description: WordPress's default comment forms are not protected against Cross-Site Request Forgery. This plugin fixes that.
    6 Version: 1.2
     6Version: 1.
    77Author: Ayesh Karunaratne
    88Author URI: https://aye.sh/open-source
     
    1717    /**
    1818     * This looks paranoid, but we use 2 tokens here. Seed, the "build_id" with a
    19      * CSPRNG (PHP 7.0+). It's base64 encdoded to fit nicely within HTML attributes.
     19     * CSPRNG (PHP 7.0+). It's base64 encoded to fit nicely within HTML attributes.
    2020     *
    2121     * Generate a traditional wp_nonce that makes use of the user session ID
    2222     * and has a tick function to prevent replay attacks.
    2323     *
    24      * Secondly, we use out own csrf_token with a proper HMAC with sha256. wp_nonce
     24     * Secondly, we use ou own csrf_token with a proper HMAC with sha256. wp_nonce
    2525     * is generated with MD5, which we no longer consider secure enough.
    2626     */
     
    3838
    3939add_action('pre_comment_on_post', function () {
    40     $status = function (): bool {
     40    $status = function (): bool {
    4141        if (!isset($_POST['build_id'], $_POST['wp_nonce'], $_POST['csrf_token'])) {
    4242            return FALSE;
  • comment-form-csrf-protection/trunk/readme.txt

    r2497192 r2942090  
    33Tags: comments, spam, security, csrf
    44Requires at least: 4.2
    5 Tested up to: 5.7
    6 Stable tag: 1.2
     5Tested up to:
     6Stable tag: 1.
    77Requires PHP: 7.1
    88License: GPLv2 or later
     
    1111
    1212== Description ==
    13 WordPress has an 9 year old unfixed security vulnerability that it does not properly validate incoming comments.
     13WordPress has aold unfixed security vulnerability that it does not properly validate incoming comments.
    1414
    15 An attacker can trick both anonymous and logged in users to post comments on a victim site without them realizing, while using their own credentials.
     15An attacker can trick both anonymous and loggedin users to post comments on a victim site without them realizing, while using their own credentials.
    1616
    1717See this issue for more information: https://core.trac.wordpress.org/ticket/10931
     
    1919This is a tiny (fewer than 40 effect lines of code) module that adds a secure token to the comment form and validate it before accepting any comment, thus making your comment forms secure as they should\'ve been for all these years!
    2020
    21 It provides no UI - just install it and you are all set!
     21It provides no UI - just install it and you are all set!
    2222
    23 1. This plugins adds a secret cryptographically-secure token to the comment form. This is a unique value and is computationally impractical to guess it.
    24 2. Upon comment subission, the comment is rejected if the secret tokens are not present or computationally invalid.
     231. This plugin adds a secret cryptographically-secure token to the comment form. This is a unique value and is computationally impractical to guess it.
     242. Upon comment subission, the comment is rejected if the secret tokens are not present or computationally invalid.
    2525
    2626== Installation ==
     
    3737
    3838= 1.1 =
    39 This is a minor release that contains minimal changes.
     39This is a minor release that contains minimal changes.
    4040
    41  - Marks the plugin as tested up-to WordPress 5.3
    42  - Fix in `composer.json` file that it required PHP^7.2 instead of intended ^7.1
    43  - A micro optimization in the plugin to call the lambda function directly within the CSRF check.
     41 Marks the plugin as tested up-to WordPress 5.3
     42 Fix in `composer.json` file that it required PHP^7.2 instead of intended ^7.1
     43 A micro optimization in the plugin to call the lambda function directly within the CSRF check.
    4444
    45 = 1.2 =
    46 Updating WordPress tested up to: 5.7
     45= 1. =
     46Minor release that contains several typo fixes and WordPress 6.3 compatibility
Note: See TracChangeset for help on using the changeset viewer.