Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
f8decd51
Unverified
Commit
f8decd51
authored
3 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(ldap) Fix LDAP object unserialization from session
issue #6175
parent
41ea74e4
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/class_ldap.inc
+13
-5
include/class_ldap.inc
with
13 additions
and
5 deletions
+13
-5
include/class_ldap.inc
+
13
−
5
View file @
f8decd51
...
@@ -101,6 +101,14 @@ class LDAP
...
@@ -101,6 +101,14 @@ class LDAP
$this
->
connect
();
$this
->
connect
();
}
}
/*! \brief Remove bogus resources after unserialize
*/
public
function
__wakeup
()
{
$this
->
cid
=
FALSE
;
$this
->
hascon
=
FALSE
;
}
/*!
/*!
* \brief Initialize a LDAP connection
* \brief Initialize a LDAP connection
*
*
...
@@ -1085,7 +1093,7 @@ class LDAP
...
@@ -1085,7 +1093,7 @@ class LDAP
*
*
* \return boolean TRUE if Success is found in $error, else return FALSE
* \return boolean TRUE if Success is found in $error, else return FALSE
*/
*/
function
success
()
function
success
()
:
bool
{
{
return
(
trim
(
$this
->
error
)
===
'Success'
);
return
(
trim
(
$this
->
error
)
===
'Success'
);
}
}
...
@@ -1093,7 +1101,7 @@ class LDAP
...
@@ -1093,7 +1101,7 @@ class LDAP
/*!
/*!
* \brief Get the error
* \brief Get the error
*/
*/
function
get_error
(
$details
=
TRUE
)
function
get_error
(
$details
=
TRUE
)
:
string
{
{
if
((
$this
->
error
==
'Success'
)
||
!
$details
)
{
if
((
$this
->
error
==
'Success'
)
||
!
$details
)
{
return
$this
->
error
;
return
$this
->
error
;
...
@@ -1118,12 +1126,12 @@ class LDAP
...
@@ -1118,12 +1126,12 @@ class LDAP
*
*
* Must be run right after the ldap request
* Must be run right after the ldap request
*/
*/
function
get_errno
()
function
get_errno
()
:
int
{
{
if
(
$this
->
error
==
'Success'
)
{
if
(
$this
->
error
==
'Success'
)
{
return
0
;
return
0
;
}
else
{
}
else
{
return
@
ldap_errno
(
$this
->
cid
);
return
@
ldap_errno
(
$this
->
cid
)
??
-
1
;
}
}
}
}
...
@@ -1132,7 +1140,7 @@ class LDAP
...
@@ -1132,7 +1140,7 @@ class LDAP
*
*
* Must be run right after the search
* Must be run right after the search
*/
*/
function
hitSizeLimit
()
function
hitSizeLimit
()
:
bool
{
{
/* LDAP_SIZELIMIT_EXCEEDED 0x04 */
/* LDAP_SIZELIMIT_EXCEEDED 0x04 */
return
(
$this
->
get_errno
()
==
0x04
);
return
(
$this
->
get_errno
()
==
0x04
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets