Skip to:
Content

bbPress.org

Changeset 6866


Ignore:
Timestamp:
10/08/2018 09:14:07 PM (6 years ago)
Author:
johnjamesjacoby
Message:

General: unslash IP and user agent strings.

These are only used in ways where slashed values are undesirable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/functions.php

    r6789 r6866  
    142142    // Check for remote address
    143143    $remote_address = ! empty( $_SERVER['REMOTE_ADDR'] )
    144         ? $_SERVER['REMOTE_ADDR']
     144        ? wp_unslash( $_SERVER['REMOTE_ADDR'] )
    145145        : '127.0.0.1';
    146146
     
    161161function bbp_current_author_ua() {
    162162    $retval = ! empty( $_SERVER['HTTP_USER_AGENT'] )
    163         ? mb_substr( $_SERVER['HTTP_USER_AGENT'], 0, 254 )
     163        ? mb_substr( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ), 0, 254 )
    164164        : '';
    165165
Note: See TracChangeset for help on using the changeset viewer.