{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/17173","labels_url":"https://api.github.com/repos/owncloud/core/issues/17173/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/17173/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/17173/events","html_url":"https://github.com/owncloud/core/issues/17173","id":90960658,"number":17173,"title":"RHDS ldap paged search, incomplete data results or 0 users","user":{"login":"AndreFelipeMachado","id":13049730,"avatar_url":"https://avatars.githubusercontent.com/u/13049730?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreFelipeMachado","html_url":"https://github.com/AndreFelipeMachado","followers_url":"https://api.github.com/users/AndreFelipeMachado/followers","following_url":"https://api.github.com/users/AndreFelipeMachado/following{/other_user}","gists_url":"https://api.github.com/users/AndreFelipeMachado/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreFelipeMachado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreFelipeMachado/subscriptions","organizations_url":"https://api.github.com/users/AndreFelipeMachado/orgs","repos_url":"https://api.github.com/users/AndreFelipeMachado/repos","events_url":"https://api.github.com/users/AndreFelipeMachado/events{/privacy}","received_events_url":"https://api.github.com/users/AndreFelipeMachado/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/app:user_ldap","name":"app:user_ldap","color":"02d7e1"},{"url":"https://api.github.com/repos/owncloud/core/labels/triage","name":"triage","color":"00FFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-25T13:12:36Z","updated_at":"2015-08-12T13:35:04Z","closed_at":null,"body":"RHDS ldap paged search, incomplete data results or 0 users\r\n\r\nHello,\r\nWe have been struggling with a kind of incompatibility between owncloud 8.0.4 and RHDS 9.1 on RHEL regarding paged searches.\r\n\r\nSome searchs are interpreted by owncloud as incomplete number of results or even zero results, even when we know there are users corresponding to the filters.\r\n\r\nAfter some digging into code we discovered that Owncloud counts results of paged searches until it finds a zero content page.\r\n\r\nAFAIK, this does not follow RFC 2696 for reliably knowing when the result finished, as the only reliable control is an empty cookie (rhds distorts this by returning \"0\").\r\n\r\nSome valid ldap queries return the first pages with no data (only comments) but valid cookie, followed by pages with data, maybe even other no data pages, more data pages, etc, until return of an empty null cookie.\r\nThis is a valid behaviour of a ldap server, as per rfc 2696.\r\n\r\nBy reading also https://github.com/owncloud/core/blob/master/apps/user_ldap/lib/access.php at the private function count($filter, $base, $attr = null, $limit = null, $offset = null, $skipHandling = false) implementation it seems that control is done only by data content until zero on a page , not by cookie.\r\n\r\nDid we wrongly understand the rfc 2696 and or the code?\r\nhttps://www.ietf.org/rfc/rfc2696.txt\r\n\r\nWhat If we disable paged searches, may it overload servers?\r\n\r\nRegards.\r\nAndre Felipe\r\n\r\n\r\n\r\n\r\n### Steps to reproduce\r\n1. RHDS 9.1\r\n2. Tens of thousands users in each LDAP branch from a common root.\r\n3. Try to configure LDAP filter wizard up to the common root.\r\n\r\n### Expected behaviour\r\nThe LDAP filter wizard should display sum of all users on server common root.\r\nThe users of different branches should be able to login\r\n\r\n### Actual behaviour\r\nThe LDAP filter wizard display zero users, despite filter being triple checked on command line.\r\nBut configuring filter to only a branch gives expected results.\r\n\r\n### Server configuration\r\n**Operating system**:\r\nDebian GNU/Linux 7.x running on VmWare 5.5\r\n\r\n**Web server:**\r\nApache 2.2.22\r\n\r\n**Database:**\r\nPostgresql 9.4.1 backported and packaged for Debian 7.x\r\n\r\n**PHP version:**\r\n5.4.41\r\n\r\n**ownCloud version:** (see ownCloud admin page)\r\n8.0.4 (stable)\r\n\r\n**Updated from an older ownCloud or fresh install:**\r\n8.0.2\r\n\r\n**List of activated apps:**\r\nLDAP, Federated cloud sharing, mail templates, cron, sharing, security, email server, log.\r\n\r\n\r\n**The content of config/config.php:**\r\n<?php\r\n$CONFIG = array (\r\n  'instanceid' => 'our_instance_id',\r\n  'passwordsalt' => 'our_salt',\r\n  'secret' => 'our_SECRET',\r\n  'enable_avatars' => false,\r\n  'trusted_domains' => \r\n  array (\r\n    0 => '127.0.0.1',\r\n    1 => 'our_domain',\r\n  ),\r\n  'datadirectory' => '/opt/data/p_07275_our_name',\r\n  'overwrite.cli.url' => 'our_url',\r\n  'dbtype' => 'pgsql',\r\n  'version' => '8.0.4.2',\r\n  'dbname' => 'dbp_07275_our_name',\r\n  'dbhost' => 'our_db_server_ip:our_db_server_port',\r\n  'dbtableprefix' => 'oc_',\r\n  'dbuser' => 'owner_our_name_p',\r\n  'dbpassword' => 'our_db_password',\r\n  'installed' => true,\r\n  'overwriteprotocol' => 'https',\r\n  'loglevel' => 2,\r\n  'logfile' => '/var/log/owncloud.log',\r\n  'asset-pipeline.enabled' => false,\r\n  'logtimezone' => 'America/Sao_Paulo',\r\n  'log_query' => true,\r\n  'ldapIgnoreNamingRules' => false,\r\n  'ldapUserCleanupInterval' => 0,\r\n  'mail_smtpmode' => 'smtp',\r\n  'mail_from_address' => 'our_name',\r\n  'mail_domain' => 'our_domain',\r\n  'mail_smtphost' => 'our_smtp_relay',\r\n  'mail_smtpport' => '25',\r\n  'has_internet_connection' => false,\r\n  'trashbin_retention_obligation' => 30,\r\n  'trashbin_auto_expire' => true,\r\n  'activity_expire_days' => 30,\r\n  'check_for_working_htaccess' => true,\r\n  'enable_previews' => false,\r\n  'theme' => 'our_theme',\r\n  'serpro.admingroup' => 'our_admin_group',\r\n  'serpro.ldapserver' => 'our_ldap_server',\r\n  'serpro.ldapport' => 389,\r\n  'serpro.ldapuser' => 'cn=our_user,ou=our_ou,ou=corp,dc=our_dc,dc=gov,dc=br',\r\n  'serpro.basedn' => 'dc=gov,dc=br',\r\n  'maintenance' => false,\r\n);\r\n\r\n\r\n\r\n\r\n**Are you using external storage, if yes which one:** local/smb/sftp/...\r\nUsing NFSv4 storage mounted on local point and mapped by \"our_directory_attribute\" user attribute.\r\n\r\n\r\n**Are you using encryption:** yes/no\r\nno\r\n\r\n**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...\r\nLDAP\r\n\r\n#### LDAP configuration (delete this part if not used)\r\n\r\n\r\n   appid   |              configkey               |                                        configvalue                                         \r\n-----------+--------------------------------------+--------------------------------------------------------------------------------------------\r\n user_ldap | cleanUpJobOffset                     | 0\r\n user_ldap | installed_version                    | 0.5.0\r\n user_ldap | types                                | authentication\r\n user_ldap | enabled                              | yes\r\n user_ldap | s01ldap_tls                          | 0\r\n user_ldap | s01ldap_host                         | our_ldap_server\r\n user_ldap | s01ldap_dn                           | uid=our_user,ou=our_ou,ou=corp,dc=our_dc,dc=gov,dc=br\r\n user_ldap | s01ldap_agent_password               | our_ldap_agent_password\r\n user_ldap | s01ldap_userfilter_objectclass       | inetOrgPerson\r\n user_ldap | s01ldap_email_attr                   | mail\r\n user_ldap | s01ldap_user_filter_mode             | 1\r\n user_ldap | s01has_memberof_filter_support       | \r\n user_ldap | s01ldap_group_filter_mode            | 1\r\n user_ldap | s01ldap_login_filter_mode            | 1\r\n user_ldap | s01ldap_experienced_admin            | 1\r\n user_ldap | s01ldap_userlist_filter              | (&(objectclass=our_object)(objectClass=person)(phpgwAccountType=u)(phpgwAccountStatus=A))\r\n user_ldap | s01ldap_login_filter                 | (&(objectclass=our_object)(mail=%uid)(phpgwAccountType=u)(phpgwAccountStatus=A))\r\n user_ldap | s01ldap_group_filter                 | (&(objectclass=our_object)(objectClass=posixGroup))\r\n user_ldap | s01ldap_configuration_active         | 1\r\n user_ldap | s01ldap_display_name                 | cn\r\n user_ldap | s01ldap_quota_attr                   | our_quota_attr\r\n user_ldap | s01ldap_quota_def                    | 1000000000\r\n user_ldap | s01ldap_override_main_server         | 0\r\n user_ldap | s01ldap_attributes_for_user_search   | mail                                                                                      +\r\n           |                                      | sn                                                                                        +\r\n           |                                      | givenName\r\n user_ldap | s01home_folder_naming_rule           | attr:our_directory_attribute\r\n user_ldap | s01ldap_port                         | 389\r\n user_ldap | s01ldap_backup_host                  | \r\n user_ldap | s01ldap_backup_port                  | \r\n user_ldap | s01ldap_nocase                       | 0\r\n user_ldap | s01ldap_turn_off_cert_check          | 0\r\n user_ldap | s01ldap_userfilter_groups            | \r\n user_ldap | s01ldap_groupfilter_objectclass      | \r\n user_ldap | s01ldap_groupfilter_groups           | \r\n user_ldap | s01ldap_group_display_name           | cn\r\n user_ldap | s01ldap_group_member_assoc_attribute | uniqueMember\r\n user_ldap | s01ldap_loginfilter_email            | 0\r\n user_ldap | s01ldap_loginfilter_username         | 1\r\n user_ldap | s01ldap_loginfilter_attributes       | \r\n user_ldap | s01ldap_attributes_for_group_search  | \r\n user_ldap | s01ldap_expert_username_attr         | \r\n user_ldap | s01ldap_expert_uuid_user_attr        | \r\n user_ldap | s01ldap_cache_ttl                    | 600\r\n user_ldap | s01ldap_expert_uuid_group_attr       | \r\n user_ldap | s01last_jpegPhoto_lookup             | 0\r\n user_ldap | s01ldap_nested_groups                | 0\r\n user_ldap | s01ldap_paging_size                  | 500\r\n user_ldap | s01ldap_base                         | dc=our_dc,dc=gov,dc=br\r\n user_ldap | s01ldap_base_groups                  | dc=our_dc,dc=gov,dc=br\r\n user_ldap | s01ldap_base_users                   | dc=our_dc,dc=gov,dc=br\r\n(49 registros)\r\n\r\n\r\n\r\n\r\n### Client configuration\r\n**Browser:**\r\nMostly Firefox 24.8.0 ESR, IE  and Gogle Chrome\r\n\r\n**Operating system:**\r\nUbuntu Linux 12.04 and Windows 7\r\n\r\n### Logs\r\n#### Web server error log\r\n```\r\nInsert your webserver log here\r\n```\r\n\r\n#### ownCloud log (data/owncloud.log)\r\n```\r\nInsert your ownCloud log here\r\n```\r\n\r\n#### Browser log\r\n```\r\nInsert your browser log here, this could for example include:\r\n\r\na) The javascript console log\r\nb) The network log \r\nc) ...\r\n```"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/130304632","html_url":"https://github.com/owncloud/core/issues/17173#issuecomment-130304632","issue_url":"https://api.github.com/repos/owncloud/core/issues/17173","id":130304632,"user":{"login":"esakol","id":1247100,"avatar_url":"https://avatars.githubusercontent.com/u/1247100?v=3","gravatar_id":"","url":"https://api.github.com/users/esakol","html_url":"https://github.com/esakol","followers_url":"https://api.github.com/users/esakol/followers","following_url":"https://api.github.com/users/esakol/following{/other_user}","gists_url":"https://api.github.com/users/esakol/gists{/gist_id}","starred_url":"https://api.github.com/users/esakol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esakol/subscriptions","organizations_url":"https://api.github.com/users/esakol/orgs","repos_url":"https://api.github.com/users/esakol/repos","events_url":"https://api.github.com/users/esakol/events{/privacy}","received_events_url":"https://api.github.com/users/esakol/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T13:35:04Z","updated_at":"2015-08-12T13:35:04Z","body":"Hi,\r\nWe have developed a workaround for this problem over v8.0.6. How can I submit it to further discuss the issue?"}}