Plugin Directory

Changeset 3474794


Ignore:
Timestamp:
03/04/2026 05:54:40 PM (4 weeks ago)
Author:
bsolveit
Message:

v1.1.1: Simplify verification token to bare hex code

Location:
ai-discovery-files/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ai-discovery-files/trunk/admin/class-admin.php

    r3472434 r3474794  
    245245        $code = isset( $_POST['verify_code'] ) ? sanitize_text_field( wp_unslash( $_POST['verify_code'] ) ) : '';
    246246
    247         // Validate: must match "ai-visibility-verify=" followed by hex, or empty to clear.
    248         if ( '' !== $code && ! preg_match( '/^ai-visibility-verify=[a-f0-9]+$/i', $code ) ) {
    249             wp_send_json_error( __( 'Invalid verification code. The code should be in the format: ai-visibility-verify=abc123', 'ai-discovery-files' ) );
     247        // Strip the prefix if pasted — we only store the hex token.
     248        $code = preg_replace( '/^ai-visibility-verify=/i', '', $code );
     249
     250        // Validate: must be hex characters only, or empty to clear.
     251        if ( '' !== $code && ! preg_match( '/^[a-f0-9]+$/i', $code ) ) {
     252            wp_send_json_error( __( 'Invalid verification code. Paste the code shown in your directory dashboard.', 'ai-discovery-files' ) );
    250253        }
    251254
  • ai-discovery-files/trunk/admin/views/partials/verify-modal.php

    r3472434 r3474794  
    108108                           class="aidf-verify-modal__input"
    109109                           value="<?php echo esc_attr( $verify_code ); ?>"
    110                            placeholder="<?php esc_attr_e( 'e.g. ai-visibility-verify=f1ade5505a308e39258ae94535be28a4', 'ai-discovery-files' ); ?>"
     110                           placeholder="<?php esc_attr_e( 'e.g. f1ade5505a308e39258ae94535be28a4', 'ai-discovery-files' ); ?>"
    111111                           spellcheck="false"
    112112                           autocomplete="off">
  • ai-discovery-files/trunk/ai-discovery-files.php

    r3472434 r3474794  
    44 * Plugin URI:        https://www.ai-visibility.org.uk/wordpress-plugin/ai-discovery-files/
    55 * Description:       Improve your AI Visibility by generating AI Discovery Files so AI systems like ChatGPT, Claude, and Gemini can correctly discover, interpret, and cite your website.
    6  * Version:           1.1.0
     6 * Version:           1.1.1
    77 * Requires at least: 6.2
    88 * Requires PHP:      8.0
     
    2424 * Plugin constants.
    2525 */
    26 define( 'AIDF_VERSION', '1.1.0' );
     26define( 'AIDF_VERSION', '1.1.1' );
    2727define( 'AIDF_PLUGIN_FILE', __FILE__ );
    2828define( 'AIDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • ai-discovery-files/trunk/includes/class-server.php

    r3472434 r3474794  
    105105            header( 'Cache-Control: no-store' );
    106106            header( 'X-Robots-Tag: noindex' );
    107             // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Plain text output, validated on save.
     107            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Plain text output, validated on save (hex only).
    108108            echo $verify_code;
    109109            exit;
  • ai-discovery-files/trunk/readme.txt

    r3473181 r3474794  
    55Tested up to: 6.9
    66Requires PHP: 8.0
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    168168== Changelog ==
    169169
     170= 1.1.1 =
     171* Fix verification code input to accept just the token (auto-strips prefix if pasted)
     172* Serve only the bare token in ai-visibility-verify.txt
     173
    170174= 1.1.0 =
    171175* Add domain verification for the AI Visibility Directory
Note: See TracChangeset for help on using the changeset viewer.