Make WordPress Core


Ignore:
Timestamp:
07/14/2009 08:20:24 AM (16 years ago)
Author:
azaozz
Message:

Truncate comment agent when longer than 255 chars, props Denis-de-Bernardy, fixes #10389

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r11450 r11713  
    984984
    985985    $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] );
    986     $commentdata['comment_agent']     = $_SERVER['HTTP_USER_AGENT'];
     986    $commentdata['comment_agent']     = substr($_SERVER['HTTP_USER_AGENT'], 0, 254);
    987987
    988988    $commentdata['comment_date']     = current_time('mysql');
Note: See TracChangeset for help on using the changeset viewer.