Hi.
After some testing and reading, I came to the conclusion that when I use objectSid or objectGUID as Persistent and Unique User ID Attribute, this module can't convert it to string, even using or not using "Does PUID hold a binary value?" checkbox.
When testing ldap server configuration I get "Warning: htmlspecialchars(): Invalid multibyte sequence in argument em check_plain()", because check_plain can't convert that binary to UTF8.
When using this module to authenticate and provision drupal users, I get a fatal "PDOException: em field_sql_storage_field_storage_write()" because that binary value is trying to be commited on database.
tia
Comment | File | Size | Author |
---|---|---|---|
#11 | ldap-ad-objectguid-as-puid-1870630-11.patch | 1.06 KB | goodydc |
#9 | ldap-ad-objectguid-as-puid-1870630-9.patch | 5.26 KB | goodydc |
#5 | ldap-ad-objectguid-as-puid-1870630.patch | 3.42 KB | goodydc |
ldap_config.html_.txt | 14.49 KB | jrochate |
Comments
Comment #1
trumanru CreditAttribution: trumanru commentedSame problem in last dev version 7.x-2.0-beta3+8-dev (2012-Dec-12).
I've excluded objectGUID and now i use sAMAccountName LDAP field as PUID. It's not so good choice cause we have been losing link to LDAP after lastname changed.
Comment #2
johnbarclay CreditAttribution: johnbarclay commentedComment #3
jdurfer CreditAttribution: jdurfer commentedWe were getting these results too. It appears to be related to improper handling of the encoded value regardless of the binary checkbox.
I edited the bootstrap.inc file, line 1545 and Commented this line:
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
And inserted next:
if (drupal_validate_utf8($text)) return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
return htmlspecialchars($text, ENT_QUOTES);
And the errors went away. Found this solution here: http://drupal.org/node/891800.
Comment #4
goodydc CreditAttribution: goodydc commentedI applied the solution proposed in comment #3 on a fresh install, using the latest code for core and the ldap module pulled from git. It did not work for me. It did remove the htmlspecialchars warnings, but I still get the following PDOException:
This was a fresh install, with LDAP configured to provision new users. The user I attempted to log in as is in Active Directory, but not Drupal, so the account should have been created.
Comment #5
goodydc CreditAttribution: goodydc commentedHere is a patch that resolves the issue for me. It includes four updates:
Please review.
Comment #6
johnbarclay CreditAttribution: johnbarclay commentedThanks. Excellent patch. I reworked it a bit and committed it to 7.x-2.x-dev. Do you mind checking the tweaked patch over?
Here's the reworking:
http://drupalcode.org/project/ldap.git/commitdiff/6b8534a998e67cbdb0c2e5...
Comment #7
johnbarclay CreditAttribution: johnbarclay commentedComment #8
johnbarclay CreditAttribution: johnbarclay commented#6 ended up going in 3 different commits separated by some other commits. Kindof a mess to look at.
Comment #9
goodydc CreditAttribution: goodydc commentedI like your rework. I looked it over and found a couple of issues, one of which was an oversight with my original patch; a documentation bug; and finally, a suggested change in terminology. Here is a patch that updates the following:
Please look it over and let me know what you think.
Comment #10
johnbarclay CreditAttribution: johnbarclay commentedThanks. Appreciate the thoroughness and followup. I committed this. See http://drupalcode.org/project/ldap.git/commitdiff/9af11caaf2efa9ab4fd6c5...
Comment #11
goodydc CreditAttribution: goodydc commentedMy pleasure. Thanks for all your great work on this module. I noticed a couple of lines from my last patch didn't make it into the last commit. Here's a small patch to reapply the missing updates:
Comment #12
johnbarclay CreditAttribution: johnbarclay commentedThis is committed. thanks.
Comment #13
toralpatelin CreditAttribution: toralpatelin commentedI am getting below error:
SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xBF\xC8\xB3|&\xA6...' for column 'ldap_user_puid_value' at row 1
I need to get this changes you guys have made. Where do I get it. Is this changes are there in 7.x-2.0-beta3?
Please help on this.
Thanks.
Comment #14
johnbarclay CreditAttribution: johnbarclay commentedYes 7.x-2.x-dev.
Comment #15
johnbarclay CreditAttribution: johnbarclay commentedComment #17
bahuma20Maybe again exists in D8?
https://www.drupal.org/node/2891193
Comment #18
bahuma20Created separate issue instead of changing version of this issue