Plugin Directory

Changeset 1099161


Ignore:
Timestamp:
02/25/2015 11:42:43 AM (11 years ago)
Author:
glatze
Message:
  • fixed a "deprecated" bug in adLDAP.php
  • better debug information from Bulk Import
Location:
active-directory-integration/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • active-directory-integration/trunk/ad_ldap/adLDAP.php

    r674096 r1099161  
    1616 * to benefit the entire community :)
    1717 *
    18  * EXTENDED with the ability to change the port, recursive_groups bug fix
    19  * and paging support by
     18 * EXTENDED with the ability to change the port, recursive_groups bug fix,
     19 * some minor bug fixes and paging support by
    2020 *   Christoph Steindorff
    2121 *   email: christoph@steindorff.de
     
    3838 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
    3939 * @revision $Revision: 91 $
    40  * @version 3.3.2 EXTENDED (201302271401)
     40 * @version 3.3.2 EXTENDED (201502251229)
    4141 * @link http://adldap.sourceforge.net/
    4242 */
     
    25752575    * @return string
    25762576    */
    2577     protected function ldap_slashes($str){
     2577    /*protected function ldap_slashes($str){
    25782578        return preg_replace('/([\x00-\x1F\*\(\)\\\\])/e',
    25792579                            '"\\\\\".join("",unpack("H2","$1"))',
    25802580                            $str);
    2581     }
     2581    }*/
     2582   
     2583    /**
     2584    * Escape strings for the use in LDAP filters
     2585    *
     2586    * DEVELOPERS SHOULD BE DOING PROPER FILTERING IF THEY'RE ACCEPTING USER INPUT
     2587    * Ported from Perl's Net::LDAP::Util escape_filter_value
     2588    *
     2589    * @param string $str The string the parse
     2590    * @author Port by Andreas Gohr <andi@splitbrain.org>
     2591    * @author Modified for PHP55 by Esteban Santana Santana <MentalPower@GMail.com>
     2592    * @return string
     2593    */
     2594    public function ldap_slashes($str){
     2595        return preg_replace_callback(
     2596            '/([\x00-\x1F\*\(\)\\\\])/',
     2597            function ($matches) {
     2598                return "\\".join("", unpack("H2", $matches[1]));
     2599            },
     2600            $str
     2601        );
     2602    }   
    25822603   
    25832604    /**
  • active-directory-integration/trunk/bulkimport.php

    r674096 r1099161  
    277277               
    278278            } else {
    279 
     279           
    280280                // Only user accounts (UF_NORMAL_ACCOUNT is set and other account flags are unset)
    281281                if (($userinfo["useraccountcontrol"][0] & (UF_NORMAL_ACCOUNT | ADI_NO_UF_NORMAL_ACOUNT)) == UF_NORMAL_ACCOUNT) {
     
    360360
    361361// Log Level
    362 if (isset($_REQUEST['debug'])) {
     362if (isset($_REQUEST['debug']) || WP_DEBUG === TRUE) {
    363363    $ADI->setLogLevel(ADI_LOG_DEBUG);
    364364} else {
Note: See TracChangeset for help on using the changeset viewer.