Commit graph

126 commits

Author SHA1 Message Date
Thomas Müller
6321596134 Merge pull request #24052 from owncloud/fix-ldap-cache-race-conditions
Fix LDAP race conditions
2016-04-25 14:55:20 +02:00
Arthur Schiwon
203b0e9cba
on clone Connection, do not take over the existing LDAP resource
For one, it solves potential conflicts when using the resource. For the
other, one on the login check (the only place where a clone happens
currently) we do not need to rebind after confirming the user's login
was successful.
2016-04-22 21:43:41 +02:00
Morris Jobke
62a59854f0
Fix LDAP race conditions
* getFromCache is wrapped in isCached
* inbetween the two calls the cache entry hits it's TTL
* getFromCache returns null
* this fix only checkes if the returned value is null and
  return only non-null values
2016-04-20 21:50:28 +02:00
Arthur Schiwon
c9587cea76 disable Paged Search when chunksize is set to 0, fixes #21136 2016-03-23 19:47:31 +01:00
Arthur Schiwon
8e0bd5630c fix writing to cache when fallback server should be used immediately 2016-03-16 14:44:18 +01:00
Arthur Schiwon
5d3183afcd improve log output when no LDAP user was found on login attempt 2016-03-05 00:18:34 +01:00
Lukas Reschke
c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Arthur Schiwon
c1871f5787 Port of test_ldap_2nddispname to master 2016-02-03 13:55:39 +01:00
Morris Jobke
e4ad4c7e98 [user_ldap] properly decode cached objects
* fixes #21896
2016-01-29 07:51:16 +01:00
Thomas Müller
682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Arthur Schiwon
86fcb08745 wizard should also detect protocol errors, as side effect enforces LDAPv3 2015-12-05 00:43:38 +01:00
Arthur Schiwon
a32b002cff always use an LDAP URL when connecting to LDAP 2015-12-05 00:09:15 +01:00
Arthur Schiwon
6b866fa917 LDAP: attempt to connect to backup server again, if main server is not available. Fixes #18701 2015-11-03 17:17:00 +01:00
Lukas Reschke
36e26c6f09 Use "json_encode" and "json_decode" instead of unserialize 2015-09-02 12:26:37 +02:00
blizzz
e0d5eb8989 remove unused var 2015-07-29 12:10:33 +02:00
blizzz
81f5672393 Remove Log info when no group filter is set, fixes #17921
The log message is superfluous and too noisy. If an admin decides not to use groups, he does not need to be reminded about it on almost every request.
2015-07-28 11:41:21 +02:00
Morris Jobke
f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Arthur Schiwon
090478a95e if possible, getUserGroups should get memberships using memberOf virtual attribute 2015-06-03 17:38:27 +02:00
Arthur Schiwon
57e8b76f48 drop global file cache support, fixes #15621 2015-05-07 14:52:44 +02:00
Jörn Friedrich Dreyer
fafecd1c05 fix cherrypicking 2015-04-10 11:08:24 +02:00
Morris Jobke
1427ea78d4 fix typo and comment 2015-04-10 09:12:37 +02:00
Morris Jobke
5626a02d69 throw exception if setup is incomplete 2015-04-10 09:12:37 +02:00
Jörn Friedrich Dreyer
488405d1ec do not hide exception when ldap server has a hiccup 2015-04-10 09:12:37 +02:00
Jenkins for ownCloud
b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Morris Jobke
06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Lukas Reschke
52495dc995 Merge pull request #13740 from owncloud/fix-12190-2
Include primary groups in user and login filter when restricting group access and also fix user counting in primary groups
2015-02-24 16:37:49 +01:00
Jenkins for ownCloud
6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Morris Jobke
166c4e266f Reduce log level of bind failed to WARN - fixes #11624 2015-02-03 11:44:28 +01:00
Arthur Schiwon
73600cfdd8 and escape the search term 2015-01-29 00:27:05 +01:00
Arthur Schiwon
f28235a7ef fix retrieval of user groups 2015-01-12 16:25:11 +01:00
Lukas Reschke
a5099b01f9 Merge pull request #12984 from owncloud/ldap-user-cleanup-master
Ldap user cleanup master
2015-01-09 10:47:02 +01:00
Lyonel Vincent
5a00b33a90 Be less verbose when disabling SSL cert validation
change log level from WARN to DEBUG
2014-12-24 16:32:27 +01:00
Arthur Schiwon
4fa39250e7 LDAP User Cleanup: Port from stable7 without further adjustements
LDAP User Cleanup

background job for user clean up

adjust user backend for clean up

register background job

remove dead code

dependency injection

make Helper non-static for proper testing

check whether it is OK to run clean up job. Do not forget to pass arguments.

use correct method to get the config from server

methods can be private, proper indirect testing is given

no automatic user deletion

make limit readable for test purposes

make method less complex

add first tests

let preferences accept limit and offset for getUsersForValue

DI via constructor does not work for background jobs

after detecting, now we have retrieving deleted users and their details

we need this method to be public for now

finalize export method, add missing getter

clean up namespaces and get rid of unnecessary files

helper is not static anymore

cleanup according to scrutinizer

add cli tool to show deleted users

uses are necessary after recent namespace change

also remove user from mappings table on deletion

add occ command to delete users

fix use statement

improve output

big fixes / improvements

PHP doc

return true in userExists early for cleaning up deleted users

bump version

control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default.

improve doc

rename cli method to be consistent with  others

introduce ldapUserCleanupInterval in sample config

don't show last login as unix epoche start when no  login happend

less log output

consistent namespace for OfflineUser

rename GarbageCollector to DeletedUsersIndex and move it to user subdir

fix unit tests

add tests for deleteUser

more test adjustements

Conflicts:
	apps/user_ldap/ajax/clearMappings.php
	apps/user_ldap/appinfo/app.php
	apps/user_ldap/lib/access.php
	apps/user_ldap/lib/helper.php
	apps/user_ldap/tests/helper.php
	core/register_command.php
	lib/private/preferences.php
	lib/private/user.php

add ldap:check-user to check user existance on the fly

Conflicts:
	apps/user_ldap/lib/helper.php

forgotten file

PHPdoc fixes, no code change

and don't forget to adjust tests
2014-12-19 19:47:54 +01:00
Arthur Schiwon
ec0f80fee9 Split mapping from Access and Helper classes into it's own. Fully test them, too.
remove unused methods

split mapping methods off from Access class

fix DB query handling

move 'clear mapping' methods from static helper to new mapping class

add tests

test directly with DB

finishing tests and fix return value from setDNbyUUID

add corresponding class for groups and make abstract test class neutral. helper tests is now obsolete as the tested functions were moved to the new mapper class.

add missing info to PHPDoc

add unmap method

fix namespaces

fix test inheritance

PHPDoc and a small code restructure for scrutinizer, no effective changes

PostgreSQL does not accept LIMIT in DELETE queries

phpdoc fixes, no code changes
2014-12-19 18:26:12 +01: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
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
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
c4f1de63a8 Fix PHPDoc in /apps 2014-05-16 22:21:57 +01:00
Thomas Müller
408189b7e4 Merge pull request #8556 from owncloud/kill-legacy-code-master
Kill legacy code master
2014-05-12 20:55:24 +02:00
Thomas Müller
33987eea83 remove legacy aka deprecated code: OC_Cache 2014-05-12 16:23:33 +02:00
Lukas Reschke
2ae1be762c That's bool and not always true 2014-05-11 16:29:59 +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
Bart Visscher
bad41c05b8 Fix PHPdoc in user_ldap
using scrutinizer patch
2014-04-15 21:05:49 +02:00
Arthur Schiwon
055a09e487 On clone create a new instance of the Configuration
To avide effects on the original instance of Connection when the clone
is modified, for instance on authentication checks.
2014-03-21 15:27:51 +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
Jörn Friedrich Dreyer
2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Robin Appelman
729210daa0 Merge branch 'master' into memcache-public
Conflicts:
	apps/user_ldap/lib/connection.php
2014-01-15 13:02:15 +01:00
Arthur Schiwon
097b6b8be9 LDAP: only read config from database, if configID is given. Not what we want to do when on-the-fly-testing settings from the admin page 2014-01-14 16:33:09 +01:00