Bug #51361 [Opn->Csd]: Your "feature" Wordwrap on user notes

From: Date: Tue, 17 May 2011 16:44:55 +0000
Subject: Bug #51361 [Opn->Csd]: Your "feature" Wordwrap on user notes
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-11025@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51361&edit=1 ID: 51361 Updated by: danbrown@php.net Reported by: dev at 10e12 dot net Summary: Your "feature" Wordwrap on user notes -Status: Open +Status: Closed Type: Bug Package: Website problem Operating System: Win XP PHP Version: Irrelevant -Assigned To: +Assigned To: danbrown Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Since the websites are not directly updated from the SVN server, the fix might need some time to spread across the globe to all mirror sites, including PHP.net itself. Thank you for the report, and for helping us make PHP.net better. Previous Comments: ------------------------------------------------------------------------ [2011-05-17 18:44:05] danbrown@php.net Automatic comment from SVN on behalf of danbrown Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=311142 Log: Increase the length of the maximum note chunk size from a paltry 70 to a more-usable 120. Fixes #51361 and about a dozen other monthly complaints in the user notes. ------------------------------------------------------------------------ [2010-03-23 12:34:16] dev at 10e12 dot net Description: ------------ Your note contains a bit of text that will result in a line that is too long, even after using wordwrap(). This is getting mighty annoying. I have edited my post some 10 times and broken it below 40 chars per line. Still no good. Sorry you cannot Cut off a function name when I write a php function name in the screen without the code becoming illegible/unreadable after post. This "feature" should pass to the far away neverland as 96% of webbrowsers are now using in excess of 1024 pixel resolution width, don't you think? Test script: --------------- What about this for an example... Intending to use it in passing a "semi-guaranteed" properly seeded random number to a client, then to capture input from the user which must be encrypted client side before being sent to the server again a) during the same session and, b) within a set time limit. for more reading also see: AES Rijndael enc/dec routines for javaScript developed and tested by Herbert Hanewinkel, http://www.hanewin.net/encrypt/aes/aes.htm <?php /* calling the function, prepping the data to send to the client... , who then uses it in a javascript implementation of AES Encrypt. */ function SHA256($str, $keyval=""){ if ($keyval!==""){//not null or empty $sHash = mhash(Constant('MHASH_SHA256'),$str, $keyval); }else{ $sHash = mhash(Constant('MHASH_SHA256'),$str); } // same as Binary 2 Hex conversion return implode(unpack('H*',$sHash),''); } /*--------------------------------------------------- Radomizing the random data with fixed data for the user and location If return value maximum is set to zero (0) the function uses mt_getrandmax If both retMin and retMax is zero (0) the function uses mt_rand w.o. limits *----------------------------------------------------*/ function local_prgn($retMin = 0, $retMax = 0){ // first get the session id of the request session $sSrv = session_id(); // the following is valid only on the current server $sSrv = implode(unpack($_SERVER['SERVER_NAME'].$_SERVER['SERVER_ADDR'].$sSrv),''); // the following applies only to the requesting client $sReq = implode(unpack($_SERVER['REMOTE_ADDR'].$_SERVER['REQUEST_TIME']),''); // the following generates a 256 bit hash $sSeed = SHA256($sSrv,$sReq); // get a SHA256 seed based on the current values // get a random value based on the uniqueness of the seed above mt_srand($sSeed); // seed the random num gen // some error handling and checking if ($retMin > $retMax){ // if wrong order of range values $rx = $retMax; $retMax = $retMin; $retMin = $rx; // swap } else if ($retMin == $retMax){ //meaningless range, not very random $retMin = 0; $retMax = 0; //ensure for next check in this range } // select what we need to return if ((($retMax == 0)&&($retMax = mt_getrandmax))||($retMin==$retMax)){ return mt_getrandmax(); }else{ return mt_getrandmax($retMin,$retMax); } } ?> Expected result: ---------------- less bugs, more speed Actual result: -------------- to many dumb bugs ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51361&edit=1

« previous php.webmaster (#11025) next »