Commit Graph

45 Commits

Author SHA1 Message Date
Regis Houssin
f497492e62 FIX compatibility with php8 2021-10-28 15:40:05 +02:00
Laurent Destailleur
10ddd621ca Fix escape error message 2021-08-20 12:40:49 +02:00
Laurent Destailleur
b7c86f3aec Fix ldap 2021-07-05 11:41:55 +02:00
Frédéric FRANCE
554e449e40
code syntax core directory 2021-02-23 22:03:23 +01:00
Sébastien Luttringer
3f13dacacd Use login from LDAP attribute
The LDAP authentication function (check_user_password_ldap) returns the login
sting when authentication is successful.

The current implementation always return the provided login to the check function,
instead of LDAP entry login field (as defined in the LDAP_FIELD_LOGIN).

This is problematic when you expect user to log with several login, like mail,
or the LDAP login doesn't match the dolibarr database.

For example, the following filter allows users auth with mail and cn ldap fields:
$dolibarr_main_auth_ldap_filter = '(&(objectClass=person)(|(cn=%1%)(mail=%1%)))';
but, dolibarr will not find the user when mail is provided.

This patch returns the $ldap->login when LDAP_FIELD_LOGIN is configured.
2021-01-12 12:07:36 +01:00
Scrutinizer Auto-Fixer
7f52920716 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2020-10-31 13:32:18 +00:00
Laurent Destailleur
d21ee07afc NEW Can define date range of validity of a login during creation 2020-09-22 14:45:19 +02:00
Frédéric FRANCE
b41ac00b98
add new rule 2020-05-21 15:05:19 +02:00
Frédéric FRANCE
ee6fadd0d5
add new rule 2020-05-21 01:41:27 +02:00
Scrutinizer Auto-Fixer
444c293c01 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2020-04-10 08:59:32 +00:00
Laurent Destailleur
075b1ea744 FIX Log of authentication ko or ko + CVE-2020-7996 2020-02-02 19:05:38 +01:00
Frédéric FRANCE
8f6d38ee82
clean indent 2019-10-27 17:01:23 +01:00
Alexandre SPANGARO
91b3bf76fd Merge branch 'develop' into 11.0_https 2019-10-01 06:11:43 +02:00
Laurent Destailleur
148afcaca8
Merge pull request #11964 from hregis/8.0_mc2
FIX getObjectSid is only for Active Directory
2019-09-27 11:25:14 +02:00
Regis Houssin
ffe866f96f FIX getObjectSid is only for Active Directory 2019-09-25 19:24:07 +02:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Laurent Destailleur
e18bd6f986
Merge branch 'develop' into nospaceaftercomma 2019-01-30 18:27:35 +01:00
Frédéric FRANCE
b10558bacd
Merge remote-tracking branch 'upstream/develop' into nospaceaftercomma 2019-01-27 23:23:38 +01:00
Laurent Destailleur
f30a3d59ba
Merge branch 'develop' into toomanylines 2019-01-27 17:59:13 +01:00
Frédéric FRANCE
f0cdf300d1
Squiz.Functions.FunctionDeclarationArgumentSpacing 2019-01-27 15:20:16 +01:00
Frédéric FRANCE
496fa9b0fb
PSR2.Files.EndFileNewline.TooMany 2019-01-27 14:10:35 +01:00
Frédéric FRANCE
7ee086b402
PSR2 space after comma in function call 2019-01-27 11:55:16 +01:00
Frédéric FRANCE
86d854f3f4
Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose 2018-10-24 23:04:26 +02:00
Philippe GRAND
33d9e24bd6 Standardize and update code 2018-09-14 11:58:49 +02:00
Scrutinizer Auto-Fixer
328d39bc71 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-10-07 11:09:31 +00:00
Laurent Destailleur
e644d9d53f Fix syntax code 2017-10-06 01:49:07 +02:00
Regis Houssin
b66da3d148 New: big refactorization of multicompany transverse mode 2017-06-06 10:23:33 +02:00
Laurent Destailleur
b076ea2985 Code comment 2016-09-19 00:49:29 +02:00
All-3kcis
c59482fea1 Fix #3542 2015-11-13 11:17:23 +01:00
Laurent Destailleur
8be08c692f Fix some secuity tests were not done. 2015-03-25 18:10:45 +01:00
Laurent Destailleur
e269aa83b5 More comments 2015-03-23 04:16:58 +01:00
Laurent Destailleur
042556a9cf Better comments 2015-03-23 03:50:55 +01:00
Laurent Destailleur
5fdd798e91 Fix: phpcheckstyle from phpcs 1.5.5 (closing tags and & char on
parameter).
2014-09-27 17:13:15 +02:00
guerinaxel
cc0d91bf2b LDAP Authentication faulty
The LDAP Authentication only test the POST authentication however we're allowed to authenticate using the function (for example via WebServices).
2014-06-20 17:00:06 +02:00
Laurent Destailleur
8c5bc11def Qual: Better error message for LDAP connection 2014-04-27 14:16:29 +02:00
Alexis Algoud
ba70794c1d Add multicompany->enabled test 2013-12-16 09:45:38 +01:00
Alexis Algoud
bb191021de Add entitytotest test, because a LDAP user can override the entity restriction without this test 2013-12-02 16:04:30 +01:00
Maxime Kohlhaas
da066badc8 LDAP : no user update for the moment, dev for updating user from ldap is not working yet 2013-01-30 16:53:59 +01:00
Maxime Kohlhaas
faccc978b4 LDAP : start implementing user update function after LDAP connexion 2013-01-30 16:50:28 +01:00
Laurent Destailleur
8d206fdfb0 Prepare move to other licence. For the moment all answers for licence
upgrade were not yet received. So we prepare for GPL by uniformizing
licence text keys to GPL-3+. Will move later to AGPL if all answers are
positive.
2013-01-16 15:36:08 +01:00
Regis Houssin
43c0a03758 Fix: strict mode tornado 2012-09-15 11:21:22 +02:00
Marcos García
706d79986c Removed parenthesis from all require_once and replaced with single quotes 2012-08-22 23:11:24 +02:00
Laurent Destailleur
3ab6ffdd0e Fix: A lot of fix for LDAP synchro 2012-05-11 12:10:47 +02:00
Laurent Destailleur
ffaf4e5465 Fix: fix not initialized variables 2011-12-05 19:03:36 +01:00
Regis Houssin
3338649316 [task #217] Move core files in core directory 2011-10-24 14:11:49 +02:00