Commit Graph

176 Commits

Author SHA1 Message Date
Arthur Schiwon f725cc66a3 consolidate user count filter in wizard and user back end 2014-11-20 18:31:39 +01:00
Morris Jobke 081787d6ae Fix infinite loop if count and limit is 0
* otherwise it will always think it hits the limit and need another round to fetch additional results
2014-11-11 12:15:30 +01:00
blizzz dc9ea893fd Merge pull request #11172 from owncloud/user-ldap-no-bcmath
Fix ldap convertSID2Str() / Remove BCMath dependency
2014-11-03 14:03:26 +01:00
Andreas Fischer d1410b46a9 user_ldap: Reimplement convertSID2Str() without BCMath dependency.
Also explicitly format sub-id integers as unsigned, which is required for
32-bit systems.
2014-11-03 12:07:53 +01:00
Arthur Schiwon 4e8c7570d4 make performance less bad. Still far from good, but at least it works 2014-10-17 20:16:04 +02:00
Arthur Schiwon 6c502e11f8 make scrutinizer happy, very minor changes 2014-10-01 11:55:53 +02:00
Arthur Schiwon f9e085b020 init a new paged search on read operations to satisfy OpenLDAP 2014-09-30 17:00:25 +02:00
Arthur Schiwon 2b9696efae abandond paged search only if PHP supports them 2014-09-30 13:13:52 +02:00
Arthur Schiwon 53ec32807a abandon ongoing paged search before starting a new one 2014-09-30 12:42:37 +02:00
Arthur Schiwon 9a63693227 properly cancel a Paginated Results operation in order to avoid protocol errors, fixes #10526 2014-09-30 12:42:37 +02:00
Arthur Schiwon fc6793f2ae better check whether string resembles a DN, fixes #9887 2014-08-11 16:40:41 +02:00
Arthur Schiwon 537468f4c4 make tests deal with missing bcmath 2014-07-11 14:08:19 +02:00
Arthur Schiwon ebee3543ce warn and continue gracefully if bcmath is not installed 2014-07-10 21:26:31 +02:00
Arthur Schiwon da490bdbbe support for AD primary groups
support for primary groups

actually the problem is only known on AD, it is only needed to take care of their attributes

adjust to ADs special behaviour

this change was not intended

cache the SID value so it is not requested over and over again

theres only one, use singular

we are access

add tests for new Access methods

add tests for new Group methods

address scrutinizer findings, mostly doc

call ldap_explode_dn from ldap wrapper, enables tests without php5-ldap

PHP Doc

yo dawg, i heard you like backslashes … php doc fix

PHPDoc updated and typos fixed while reviewing
2014-07-08 21:32:21 +02:00
Arthur Schiwon 89f2691515 adjust access constructor to master 2014-06-25 11:46:21 +02:00
Arthur Schiwon 452efa5fab Port of LDAP Wizard: get correct total no of users, groups and complete list of groups on big setups #9002
fix PHPdoc

Conflicts:
	apps/user_ldap/lib/connection.php

add method to count groups on LDAP

Conflicts:
	apps/user_ldap/lib/access.php

LDAP Wizard: count users and groups with the power of paged search

Conflicts:
	apps/user_ldap/lib/wizard.php

consolidate requirement check

fix PHPdoc

Conflicts:
	apps/user_ldap/lib/access.php

Wizard: get really all groups from LDAP by power of Paged Search

Conflicts:
	apps/user_ldap/lib/wizard.php

make all this work in an early configuration state in the wizard by marking  the config active and ignoring the validation state.

Conflicts:
	apps/user_ldap/lib/connection.php

simplify two methods a bit, because they are not used for group search anymore

Conflicts:
	apps/user_ldap/lib/wizard.php

remove unused vars; increase scrutinizer happiness
2014-06-25 11:45:55 +02:00
Arthur Schiwon 93edacb357 Backport subset of #4179, re-established Oracle compatibility for LDAP
Conflicts:
	apps/user_ldap/lib/access.php
2014-06-20 20:49:34 +02:00
Arthur Schiwon 928945ec7e fix typo in var name 2014-06-05 16:16:08 +02:00
Arthur Schiwon e962999896 get rid of @read in PHP doc after rebase 2014-06-03 13:01:14 +02:00
Arthur Schiwon 6d64d7ec3f LDAP: put out fetching of user meta data into a fully tested class of its own and update them (mail, quota, etc.) directly after mapping. Fixes #7785 properly on master 2014-06-03 12:59:09 +02:00
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Robin McCorkell e7aebc5c32 Fix whitespace issues 2014-05-16 22:23:36 +01:00
Robin McCorkell a17f9111a0 PHPDoc fixes for user_ldap 2014-05-16 22:21:57 +01:00
Robin McCorkell c4f1de63a8 Fix PHPDoc in /apps 2014-05-16 22:21:57 +01:00
Lukas Reschke cd7fc5cb80 Use array as type 2014-05-12 19:31:21 +02:00
Lukas Reschke 416f8b186d Use @return instead of @returns 2014-05-11 16:27:18 +02:00
Lukas Reschke fc8be5abc3 Use proper PHPDoc and variable names in the LDAP lib
My IDE was so sad about this that it marked the whole file in red and yellow and forced me to fix this.
2014-05-11 15:17:27 +02:00
blizzz 645ecb7644 Merge pull request #6297 from leo-b/fix_ldap_errors
only check ldap_errno if an ldap_* function actually fails
2014-04-23 16:26:43 +02:00
Arthur Schiwon c1c2f2c49e add additional comments, PHPdoc and check whether it's really applicable 2014-04-22 18:36:43 +02:00
Arthur Schiwon 1c71d5c444 LDAP: cache display names immediately on retrieval, saves tens of unecessary queries to LDAP server in the share dialog for example 2014-04-22 18:36:37 +02:00
blizzz 36c8dec10a Merge pull request #8220 from owncloud/type-hinting-ldap
Fix PHPdoc in user_ldap
2014-04-17 18:15:40 +02:00
Bart Visscher bad41c05b8 Fix PHPdoc in user_ldap
using scrutinizer patch
2014-04-15 21:05:49 +02:00
Arthur Schiwon ee3368d2ad replace hardcoded limit of 400 with user controlled ldapPagingSize value 2014-04-09 11:38:51 +02:00
Arthur Schiwon 2e5adadad7 Put inner loop into own method, let's see whether it makes scrutinizer happier 2014-04-09 11:31:56 +02:00
Arthur Schiwon bdc418d1f9 var count is assigned in the inner loop so it must be checked inside there to be properly used as part of the exit condition of the outer loop 2014-04-09 11:31:56 +02:00
Arthur Schiwon 43402c56dd initialize variable 2014-04-09 11:31:56 +02:00
Arthur Schiwon 40f9875f11 LDAP: fix user report i.e. count for LDAP servers with really many users 2014-04-09 11:31:56 +02:00
Arthur Schiwon 8bb27551bd LDAP: make sure cache key for paged result cookie matches when limit or offset is null or 0 2014-04-09 11:31:56 +02:00
Robin McCorkell 7c3da27bf6 Fix duplicate ipauniqueid 2014-03-20 20:38:06 +00:00
Robin McCorkell ca595611f5 Add FreeIPA UUID compatibility, fixes #7796
Ability to use ipauniqueid for the UUID of a user
2014-03-19 20:30:24 +00:00
Alexander Bergolth f850fcfac5 "reset" ldap pagedSearch control by setting it to a high value 2014-03-06 12:23:20 +01:00
root 8fcc29ee8b only check ldap_errno if an ldap_* function actually fails
fix wizard errors
reset search paging right after the search, not before some of the possible next search operations
cookie contains binary characters, don't log it
  (avoids json_encode(): Invalid UTF-8 sequence in argument errors)
2014-03-06 12:07:03 +01:00
Arthur Schiwon c0328b4f0f LDAP: improve compilation of filters 2014-02-19 13:13:01 +01:00
Scrutinizer Auto-Fixer adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00
Thomas Müller 9fac95c2ab Merge branch 'master' into scrutinizer_documentation_patches
Conflicts:
	lib/private/appconfig.php
2014-02-14 23:03:27 +01:00
Arthur Schiwon e156f85bfb Rephrase and clarify log message 2014-02-10 11:29:08 +01:00
Jörn Friedrich Dreyer 2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Arthur Schiwon b669e1a3c1 LDAP: implement userCount action. This required to (finally) clean up and refactor the search method, which will have a positive performance impact on paged search. 2014-01-08 12:07:57 +01:00
Arthur Schiwon 03375d6c52 LDAP: username2dn should only return DNs that belong to the current LDAP server. Might be not perfect. Easy perfect solution would increase communication with LDAP server. Let's see if it is good enough 2013-11-25 22:08:11 +01:00
Thomas Müller ffb0e14d7b replacing ownCloud by theme-able name or avoid it's usage 2013-10-29 23:29:16 +01:00
Arthur Schiwon 81dbe7dab7 Port PR #5457 to master 2013-10-25 14:15:05 +02:00
Donald Buczek 3fc232370e make sure the shared ldap connection is rebound to the configured user after being used for password checking. 2013-10-25 11:12:18 +02:00
Arthur Schiwon d78a80a689 merge master with resolved conflicts 2013-10-23 12:01:45 +02:00
Arthur Schiwon e61d961efb LDAP: Fix base-comparison with multibyte characters, fixes #5081. Thanks to @sfyang 2013-10-19 00:51:37 +02:00
Arthur Schiwon 652caa1c88 LDAP: move Configuration out of Connection into class of its own. The new wizard requires it. 2013-10-17 19:13:14 +02:00
Arthur Schiwon 0c837cefb6 LDAP: allow different UUID attributes for groups and users 2013-10-04 11:47:40 +02:00
Arthur Schiwon 81cf4a22ef LDAP: coding style 2013-09-27 13:34:15 +02:00
Arthur Schiwon d4f92494a2 LDAP: make Access be a dependency to the user and group backend instead of inheriting it. 2013-09-27 13:34:15 +02:00
Arthur Schiwon 6e850e0bee LDAP: establish wrapper interface to allow proper mocking 2013-09-27 13:34:15 +02:00
Arthur Schiwon 52454e39b7 LDAP: move is_resource check to ldap wrapper to make it mockable 2013-09-27 13:34:15 +02:00
Arthur Schiwon d34fbf3a86 LDAP: move PHP LDAP functions calls to an LDAP Wrapper for better isolation and mock testing 2013-09-27 13:34:15 +02:00
Arthur Schiwon 321c514782 LDAP: case insensitive replace for more robustness 2013-08-27 22:23:48 +02:00
Jörn Friedrich Dreyer 88fc410c19 fix numRows usage in user_ldap 2013-06-24 16:29:58 +02:00
Arthur Schiwon bd7771867b LDAP: fix generation of alternate internal name on conflicts. Use also smaller number for better user experience on e.g. *DAV links 2013-05-30 16:55:21 +02:00
Arthur Schiwon beaa10b823 Merge branch 'master' into ldap_configurable_username_n_uuid 2013-05-13 12:41:22 +02:00
Arthur Schiwon 3f1717d3d5 LDAP: implement UUID and internal username override 2013-05-08 14:56:52 +02:00
Bart Visscher 175633d380 Merge pull request #3050 from owncloud/===_and_!==_in_user_ldap-app
Use === and !== in user_ldap app
2013-05-07 12:45:43 -07:00
Arthur Schiwon 1e2b872160 LDAP: cachekey in set method needs to match with that one from get 2013-05-03 15:13:37 +02:00
Arthur Schiwon 22a8e7ad55 LDAP: remove restriction from group names to be in line with core behaviour again 2013-05-03 14:11:06 +02:00
kondou d6b13ccd12 Use !== and === in user_ldap app – Part 2 2013-04-20 22:46:37 +02:00
Arthur Schiwon 0f4e02b6fc LDAP: avoid irritating log output 2013-03-19 14:40:30 +01:00
Arthur Schiwon 1e07801c95 LDAP: compatibility with Novell eDirectory UUID 2013-03-11 13:30:06 +01:00
Arthur Schiwon 055fadd10d LDAP: escape some more chars for proper search filter, fixes #1673 2013-03-05 14:33:20 +01:00
Arthur Schiwon b08894ba77 LDAP: error codes can be negative, too 2013-03-05 13:47:03 +01:00
Arthur Schiwon 64551ee06f LDAP: sort users on server-side 2013-02-26 22:27:09 +01:00
Bart Visscher 92a36ca8b8 Join short comment lines 2013-02-15 15:45:34 +01:00
Bart Visscher 1ef2ecd6e8 Style cleanup user_ldap 2013-02-14 22:16:48 +01:00
Arthur Schiwon 1e45453da2 LDAP: format dn before using it, not other way round. fixes #1605 2013-02-13 14:49:18 +01:00
Arthur Schiwon afc9fe419a adjust copyright 2013-02-10 21:53:27 +01:00
Arthur Schiwon dbb4be903c LDAP: change generation of internal names. Use UUID for users. Change to sequential numbers for groups as they are still used as display names 2013-02-10 21:52:57 +01:00
Arthur Schiwon b3b0544e17 LDAP: make it possible to define attributes that should be considered on searches 2013-01-31 01:46:34 +01:00
Arthur Schiwon ad1113c2cb LDAP: fix parameter passed not as expected 2013-01-16 14:56:57 +01:00
Arthur Schiwon 4a8c25eef5 dechex not necessary, do not waste time with it 2013-01-08 19:25:19 +01:00
Arthur Schiwon 19fa78d1ee Code style 2013-01-08 19:00:49 +01:00
Arthur Schiwon ec1caa7d35 support LDAP search using multiple base DNs also with paged results, implements #395 2013-01-04 23:57:55 +01:00
Arthur Schiwon 81489ad860 support multiple base DNs 2013-01-03 21:38:53 +01:00
Bart Visscher df7d6cb26c More style fixes 2012-12-15 00:43:46 +01:00
Bart Visscher 68562dafb4 More whitespace fixes 2012-12-15 00:43:46 +01:00
Bart Visscher f39454ed12 Fix "Line indented incorrectly" 2012-12-15 00:43:46 +01:00
Bart Visscher 8256650da8 Fix "No space found after comma in function call" 2012-12-15 00:43:46 +01:00
blizzz 680ff3a51b Merge pull request #584 from wardragon/ldap_access_userExists_fix
Really fix OCP\Share::shareItem with LDAP users
2012-12-12 16:59:43 -08:00
Lorenzo M. Catucci de34f771c2 Exclude LDAP backend from global user searches
triggered by itself.
2012-12-07 17:19:30 +01:00
Arthur Schiwon 4cb760a924 LDAP: ldap_explode_dn escaped too much, fix it by manual replacement. Fixes different problems, esp. with non-ascii characters in the dn (#631) 2012-12-03 12:55:42 +01:00
Arthur Schiwon 495a8da354 port 95cee0e from stable45 2012-11-21 19:29:56 +01:00
Arthur Schiwon aebd4fd32d port dd694b5 from stable45 2012-11-21 19:28:29 +01:00
Arthur Schiwon 24e13419a3 LDAP: escape values in the DN, fixes #419 2012-11-21 19:25:10 +01:00
Arthur Schiwon d79e9a2da7 LDAP: cherrypick objectGUID handling from stable45, was part of PR 344 2012-11-12 17:00:23 +01:00
Lorenzo M. Catucci ca24f4767b Return an empty array on succesful existence check 2012-11-05 17:35:09 +01:00
Lorenzo M. Catucci 510191db68 Return true or false from readAttribute if $attr is empty
This way, readAttribute can act as an existence checker.
2012-11-05 15:38:49 +01:00
Arthur Schiwon 3f85432df9 LDAP: make filter in readAttribute configurable 2012-10-27 19:43:07 +02:00