Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -301,12 +301,21 @@ |
302 | 302 | } else { |
303 | 303 | throw new MWException( __METHOD__ . ': Invalid UDP specification' ); |
304 | 304 | } |
| 305 | + |
305 | 306 | // Clean it up for the multiplexer |
306 | 307 | if ( strval( $prefix ) !== '' ) { |
307 | 308 | $text = preg_replace( '/^/m', $prefix . ' ', $text ); |
| 309 | + |
| 310 | + // Limit to 64KB |
| 311 | + if ( strlen( $text ) > 65534 ) { |
| 312 | + $text = substr( $text, 0, 65534 ); |
| 313 | + } |
| 314 | + |
308 | 315 | if ( substr( $text, -1 ) != "\n" ) { |
309 | 316 | $text .= "\n"; |
310 | 317 | } |
| 318 | + } elseif ( strlen( $text ) > 65535 ) { |
| 319 | + $text = substr( $text, 0, 65535 ); |
311 | 320 | } |
312 | 321 | |
313 | 322 | $sock = socket_create( $domain, SOCK_DGRAM, SOL_UDP ); |
Property changes on: trunk/phase3/includes/GlobalFunctions.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
314 | 323 | Merged /branches/wmf/1.17wmf1/includes/GlobalFunctions.php:r81718 |