Making WordPress.org


Ignore:
Timestamp:
10/31/2025 05:52:50 AM (3 months ago)
Author:
dd32
Message:

Slack: Use hahs_equals() when comparing webhook tokens.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/slack/announce.php

    r14280 r14583  
    3030// WEBHOOK_TOKEN_1, WEBHOOK_TOKEN_2, etc.
    3131while ( defined( __NAMESPACE__ . '\\WEBHOOK_TOKEN_' . ++$i ) ) {
    32     if ( constant( __NAMESPACE__ . '\\WEBHOOK_TOKEN_' . $i ) === $_POST['token'] ) {
     32    if ( hash_equals( constant( __NAMESPACE__ . '\\WEBHOOK_TOKEN_' . $i ), $_POST['token'] ) ) {
    3333        run( $_POST );
    3434    }
Note: See TracChangeset for help on using the changeset viewer.