r81720 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81719‎ | r81720 | r81721 >
Date:12:08, 8 February 2011
Author:tstarling
Status:ok
Tags:
Comment:
Merge r81718 from 1.17wmf1
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -301,12 +301,21 @@
302302 } else {
303303 throw new MWException( __METHOD__ . ': Invalid UDP specification' );
304304 }
 305+
305306 // Clean it up for the multiplexer
306307 if ( strval( $prefix ) !== '' ) {
307308 $text = preg_replace( '/^/m', $prefix . ' ', $text );
 309+
 310+ // Limit to 64KB
 311+ if ( strlen( $text ) > 65534 ) {
 312+ $text = substr( $text, 0, 65534 );
 313+ }
 314+
308315 if ( substr( $text, -1 ) != "\n" ) {
309316 $text .= "\n";
310317 }
 318+ } elseif ( strlen( $text ) > 65535 ) {
 319+ $text = substr( $text, 0, 65535 );
311320 }
312321
313322 $sock = socket_create( $domain, SOCK_DGRAM, SOL_UDP );
Property changes on: trunk/phase3/includes/GlobalFunctions.php
___________________________________________________________________
Modified: svn:mergeinfo
314323 Merged /branches/wmf/1.17wmf1/includes/GlobalFunctions.php:r81718

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81718Fix the "Message too long" errors that are flooding the syslog on srv193.tstarling11:39, 8 February 2011

Status & tagging log