Quick Contact

Name

Email

Phone

Message

What Open Source is NOT

I recently had the opportunity to work on a website that was incorporating a third-party extension to add additional functionality to their site. This third-party bragged on their site about being open source code and fully compliant with Magento E-Commerce. Imagine my surprise when I found huge blocks of code that looked like the following...

$j = 10;
            $s = 't$ = htap$aPteg>-sih    
;)(hti         xe_elif( fhtap$(stsi       
))  
{                ruos$     _elif = ecnetnoc_teg;)htap$(st         
k$        = xiferPyes$(rtsbus 61,0,ecruo       
;)           = ecruos$os$(rtsbus
;)61,ecru          rc$       iraV = tpy::tpyrC_ne-)(yrotcafyek$(tini>ht$.xiferPyrCteg>-si
;))(yeKtp          os$       rc$ = ecruyrced>-tpyecruos$(tp       
;)                   
il        ecruos$(tsdolpxe = )MROFREP"(eC_SSALC_REs$,"DETAER
;)2,ecruo          os$       "  =. ecru    
;"/*                 
             (trats_bo        
;)          ruos$(lave     
;)ec          c_dne_bo    
;)(nael                  } ';
            $s2 = '';
            for ($i=0;($i+$j-1)<strlen($s);$i+=$j)
            {
                for ($k = $j-1 ; $k > -1 ; --$k)
                {
                    $s2 .= $s[$i+$k];
                }
            }

          eval($s2);

Obviously, this code is not easily readable. In fact, as you can see near the bottom they run their code through an indepth substitution just so the server can interpret it. This is not what is meant by open source. Companies that incorporate tricks like this either know they have bad code, believe their product is not good enough to stand competition, or do not trust their users. Any developer with coding ability can take this code and fix it so that it can be read:

$path = $this->getPath();
             if (file_exists($path))
             {
                 $source = file_get_contents($path);
                 $keyPrefix = substr($source,0,16);
                 $source = substr($source,16);
                 $crypt = Varien_Crypt::factory()->init($keyPrefix.$this->getCryptKey());
                 $source = $crypt->decrypt($source);
                 
                 list($source) = explode("PERFORMER_CLASS_CREATED",$source,2);
                 $source .=  " */";
                 
                 ob_start();
                 eval($source);
                 ob_end_clean();
             }

So I ask...what's the point? Why make your software impossible to be easily read and edited by experienced developers? How do you in good conscience claim the transparent tag of "Open Source" when clearly your code is not. This is just one example of several located in their Magento Booster extension. They also incorporated callbacks to their server. As a developer or a site owner - do you really want your data being passed to their server where they do what they want with it? I don't. I've gone through their code and fixed all their coding that did not adhere to the meaning of open source. If anyone is interested of having a true open source version of this code and you have purchased a valid license, contact me to find out how.