From:             
Operating system: Windows 7 Business
PHP version:      5.3.3
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:Engine not responding to code properly

Description:
------------
cipher using php code to allow 2 way encryption currently it uses a
predefined 

array of Char's it then loops though this and creates every cipher possible
by 

shifting the first char to the end in a new array, and as it ciphers one
letter 

the cipher moves forward on cipher it's using



No my problem is that i have had to place a check in to make sure the
cipher has 

finished if it has and the decrypted cipher is not the same as the original


string rerun the cipher with the same string,



Now this should not be needed, also this still creates error's



This has been tested in php 5.3.1 and 5.3.3,



The occurrence the same some times refreshing the system give a cipher
that's to 

short for the string and this is with the check



whats more annoying is that there is a check in the code to prevent this 

happening as it was happening more and more 



P.S now i got to re-random my cipher base as its useless one made public
haha

Test script:
---------------
http://pastebin.com/r934gLpM





inside encryptString you will see 



if($this->decryptString($encoded) === $string){

        return $encoded;

}else{

        return $this->encryptString($string);

}



at the end it should not be possible for me to get a string thats dose not
break back.

Expected result:
----------------
The cipher to not occasionally return a string that is to short 

Actual result:
--------------
Using the code above works but keep refreshing it and you will see you will
get 

ciphers back that are 2 small a common one for me is "LX" on its own.



this happens more and more with a bigger string in the 



$secure->encryptString

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52930&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52930&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52930&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52930&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52930&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52930&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52930&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52930&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52930&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52930&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52930&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52930&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52930&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52930&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52930&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52930&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52930&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52930&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52930&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52930&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52930&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52930&r=mysqlcfg

Reply via email to