You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just upgraded to Nextcloud 13 beta1 (user_ldap version: 1.3.1) and this error appears over and over in the logs when an LDAP user does any action, even when clicking a button or reloading the page.
bin2hex() expects parameter 1 to be string, array given at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1638
Everything seems to work fine for now, but even if this is a harmless error it fills the logs pretty quick with just one LDAP user logged in. With a few dozens of active users it will produce way more logs than wanted.
{"reqId":"AtA14Ajf4jlJO8K1zf1a","level":3,"time":"2017-12-07T11:37:10+00:00","remoteAddr":"11.22.33.44","user":"emilian.mitocariu","app":"PHP","method":"PROPFIND","url":"\/remote.php\/dav\/files\/emilian.mitocariu\/","message":"bin2hex() expects parameter 1 to be string, array given at \/var\/www\/nextcloud\/apps\/user_ldap\/lib\/Access.php#1638","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.3.2 (Nextcloud)","version":"13.0.0.6"}
Every action of the AD-User creates an error:
bin2hex() expects parameter 1 to be string, array given at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1638
Server configuration
Operating system: Ubuntu 16.04 Web server: Apache2 Database: MariaDB 10.0.31 PHP version: 7.0.22 Nextcloud version: Nextcloud 13.0.0 Beta 1 Build:2017-12-06T22:01:29+00:00 430f60d Updated from an older Nextcloud/ownCloud or fresh install: Update from 12.0.3 Where did you install Nextcloud from: Nextcloud.com Signing status:
Are you using external storage, if yes which one:
No Are you using encryption:
No Are you using an external user-backend, if yes which one:
ActiveDirectory
Nextcloud log
{"reqId":"1gwySOA38yWTBqCesb6j","level":3,"time":"2017-12-07T12:23:36+00:00","remoteAddr":"IP_Adress_Changed","user":"001D7D89-485F-4970-8C2A-6B7F82C485DD","app":"PHP","method":"PROPFIND","url":"\/remote.php\/dav\/files\/001D7D89-485F-4970-8C2A-6B7F82C485DD\/","message":"bin2hex() expects parameter 1 to be string, array given at \/var\/www\/nextcloud\/apps\/user_ldap\/lib\/Access.php#1638","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"13.0.0.6"}
essentially it makes it more readable. The function should not have been called in the first play, and I blame the short comparison version as cause, although i could not verify it. Errors will go away anyway since the the function is now provided with the actual value, too.
Activity
Emi94 commentedon Dec 6, 2017
If it's worth noting, I upgraded another nextcloud server and I get the same error
blizzz commentedon Dec 7, 2017
@Emi94 AD I guess? Would be great if you could provide a full report according to the template https://raw.githubusercontent.com/nextcloud/server/master/issue_template.md
Emi94 commentedon Dec 7, 2017
Steps to reproduce
Expected behaviour
No Error should be thrown
Actual behaviour
This error is thrown multiple times when an LDAP user does any action:
Server configuration
Operating system: Ubuntu 16.04
Web server: Apache2
Database: Postgresql 9.5
PHP version: php 7.0
Nextcloud version: 13.0.0 beta1
Updated from an older Nextcloud/ownCloud or fresh install: updated from 12.0.3
Signing status
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP(Samba)
LDAP configuration (delete this part if not used)
LDAP config
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
MJLorne commentedon Dec 7, 2017
Steps to reproduce
Expected behaviour
Clean Logfile
Actual behaviour
Every action of the AD-User creates an error:
bin2hex() expects parameter 1 to be string, array given at /var/www/nextcloud/apps/user_ldap/lib/Access.php#1638
Server configuration
Operating system: Ubuntu 16.04
Web server: Apache2
Database: MariaDB 10.0.31
PHP version: 7.0.22
Nextcloud version: Nextcloud 13.0.0 Beta 1 Build:2017-12-06T22:01:29+00:00 430f60d
Updated from an older Nextcloud/ownCloud or fresh install: Update from 12.0.3
Where did you install Nextcloud from: Nextcloud.com
Signing status:
Signing status
List of activated apps:
App list
Enabled:
Disabled:
Nextcloud configuration:
Config report
Are you using external storage, if yes which one:
No
Are you using encryption:
No
Are you using an external user-backend, if yes which one:
ActiveDirectory
LDAP configuration (delete this part if not used)
LDAP config
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration | s01 |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport | 1 |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | nextcloud |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | ou=_changed_neu,dc=changed,dc=de |
| ldapBaseGroups | ou=_changed_neu,dc=changed,dc=de |
| ldapBaseUsers | ou=_changed_neu,dc=changed,dc=de |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDefaultPPolicyDN | |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | |
| ldapExpertUsernameAttr | |
| ldapGidNumber | gidNumber |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | (|(cn=changed)) |
| ldapGroupFilterGroups | changed |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | |
| ldapGroupMemberAssocAttr | member |
| ldapHost | changed |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(&(|(objectclass=person))(|(|(memberof=CN=changed,OU=Sicherheitsgruppen,OU=_OU_changed,OU=_changed_neu,DC=changed,DC=de)(primaryGroupID=26729))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid)))) |
| ldapLoginFilterAttributes | |
| ldapLoginFilterEmail | 1 |
| ldapLoginFilterMode | 0 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | |
| ldapPagingSize | 500 |
| ldapPort | 389 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | displayname |
| ldapUserDisplayName2 | |
| ldapUserFilter | (&(|(objectclass=person))(|(|(memberof=CN=changed,OU=Sicherheitsgruppen,OU=_OU_changed,OU=_changed_neu,DC=changed,DC=de)(primaryGroupID=26729)))) |
| ldapUserFilterGroups | changed |
| ldapUserFilterMode | 0 |
| ldapUserFilterObjectclass | person |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| turnOnPasswordChange | 0 |
| useMemberOfToDetectMembership | 1 |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Client configuration
Browser: Chrome
Operating system: Windows 10
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
{"reqId":"1gwySOA38yWTBqCesb6j","level":3,"time":"2017-12-07T12:23:36+00:00","remoteAddr":"IP_Adress_Changed","user":"001D7D89-485F-4970-8C2A-6B7F82C485DD","app":"PHP","method":"PROPFIND","url":"\/remote.php\/dav\/files\/001D7D89-485F-4970-8C2A-6B7F82C485DD\/","message":"bin2hex() expects parameter 1 to be string, array given at \/var\/www\/nextcloud\/apps\/user_ldap\/lib\/Access.php#1638","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"13.0.0.6"}Varbin commentedon Dec 9, 2017
I can also reproduce.
Differences to reports above:
My ldap server is OpenLDAP's slapd.
Varbin commentedon Dec 9, 2017
The function in which the error occurs
convertObjectGUID2Str($oguid).MorrisJobke commentedon Dec 13, 2017
@blizzz: Also happens here and the
$oguidis filled with the group DNs:https://github.com/nextcloud/server/blob/master/apps/user_ldap/lib/Access.php#L1639-L1663
blizzz commentedon Dec 13, 2017
a quick thing you may try:
essentially it makes it more readable. The function should not have been called in the first play, and I blame the short comparison version as cause, although i could not verify it. Errors will go away anyway since the the function is now provided with the actual value, too.
MorrisJobke commentedon Dec 13, 2017
Yes - the brackets are missing to have the two short forms being separated properly.
MorrisJobke commentedon Dec 13, 2017
Let me create a PR and check if it helps over here.
blizzz commentedon Dec 13, 2017
yes, that's what i think but I could not see wrong behavior with 3v4l.org on any version
MorrisJobke commentedon Dec 13, 2017
Let me take care of this then.
MorrisJobke commentedon Dec 13, 2017
Seems to be like that:
https://3v4l.org/OdXp2
MorrisJobke commentedon Dec 13, 2017
Fix is in #7479 and solved it for the instance I noticed it.