https://bugs.contribs.org/show_bug.cgi?id=10641

            Bug ID: 10641
           Summary: mcrypt deprecated in PHP 7.1
    Classification: Contribs
           Product: SME Contribs
           Version: Futur
          Hardware: ---
                OS: ---
            Status: CONFIRMED
          Severity: normal
          Priority: P3
         Component: smeserver-phpldapadmin
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
  Target Milestone: ---

Just tried running this on my home machine having moved it across to PHP 7.1

Noted the following errors:

Deprecated: Function mcrypt_module_open() is deprecated in
/usr/share/phpldapadmin/lib/functions.php on line 749

 Deprecated: Function mcrypt_enc_get_iv_size() is deprecated in
/usr/share/phpldapadmin/lib/functions.php on line 750

 Deprecated: Function mcrypt_enc_get_iv_size() is deprecated in
/usr/share/phpldapadmin/lib/functions.php on line 750

Deprecated: Function mcrypt_enc_get_key_size() is deprecated in
/usr/share/phpldapadmin/lib/functions.php on line 751

Deprecated: Function mcrypt_generic_init() is deprecated in
/usr/share/phpldapadmin/lib/functions.php on line 751

Deprecated: Function mcrypt_generic() is deprecated in
/usr/share/phpldapadmin/lib/functions.php on line 752


The error is caused in this section which looks like it was lifted from
phpmyadmin !!

   728  /**
   729   * Encryption using blowfish algorithm
   730   *
   731   * @param string Original data
   732   * @param string The secret
   733   * @return string The encrypted result
   734   * @author lem9 (taken from the phpMyAdmin source)
   735   */
   736  function blowfish_encrypt($data,$secret=null) {
   737          if (DEBUG_ENABLED &&
(($fargs=func_get_args())||$fargs='NOARGS'))
   738                  debug_log('Entered
(%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
   739  
   740          # If our secret is null or blank, get the default.
   741          if ($secret === null || ! trim($secret))
   742                  $secret =
$_SESSION[APPCONFIG]->getValue('session','blowfish') ?
$_SESSION[APPCONFIG]->getValue('session','blowfish') : session_id();
   743  
   744          # If the secret isnt set, then just return the data.
   745          if (! trim($secret))
   746                  return $data;
   747  
   748          if (function_exists('mcrypt_module_open') && ! empty($data)) {
   749                  $td =
mcrypt_module_open(MCRYPT_BLOWFISH,'',MCRYPT_MODE_ECB,'');
   750                  $iv =
mcrypt_create_iv(mcrypt_enc_get_iv_size($td),MCRYPT_DEV_URANDOM);
   751                 
mcrypt_generic_init($td,substr($secret,0,mcrypt_enc_get_key_size($td)),$iv);
   752                  $encrypted_data =
base64_encode(mcrypt_generic($td,$data));
   753                  mcrypt_generic_deinit($td);
   754  


I presume the same errors will occur here too:

   783   * @return string Original data
   784   * @author lem9 (taken from the phpMyAdmin source)
   785   */
   786  function blowfish_decrypt($encdata,$secret=null) {


Bit of a blow - it's the only damn thing that lets me find stuff in LDAP !

May get my young lad to see if he can figure a couple of new routines.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/

Reply via email to