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
74ae1d63
Verified
Commit
74ae1d63
authored
2 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
(Personal) - adapts to php 8.2
Personal classes adapted to php8.2
parent
36c852f8
core-php8
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/personal/generic/class_UserPasswordAttribute.inc
+2
-2
plugins/personal/generic/class_UserPasswordAttribute.inc
plugins/personal/generic/class_user.inc
+4
-4
plugins/personal/generic/class_user.inc
plugins/personal/roles/class_userRoles.inc
+2
-2
plugins/personal/roles/class_userRoles.inc
with
8 additions
and
8 deletions
+8
-8
plugins/personal/generic/class_UserPasswordAttribute.inc
+
2
−
2
View file @
74ae1d63
...
...
@@ -192,10 +192,10 @@ class UserPasswordAttribute extends CompositeAttribute
if
(
$value
==
'%askme%'
)
{
return
[
'%askme%'
,
''
,
''
,
$value
,
'FALSE'
];
}
$parts
=
explode
(
'|'
,
$value
,
3
);
$parts
=
explode
(
'|'
,
(
string
)
$value
,
3
);
if
((
count
(
$parts
)
<
3
)
||
!
in_array
(
$parts
[
1
],
[
'TRUE'
,
'FALSE'
]))
{
/* Old format from FD<1.4 */
list
(
$value
,
$password
)
=
explode
(
'|'
,
$value
,
2
);
list
(
$value
,
$password
)
=
explode
(
'|'
,
(
string
)
$value
,
2
);
}
else
{
list
(
$pw_storage
,
$locked
,
$password
)
=
$parts
;
return
[
$pw_storage
,
$password
,
$password
,
$this
->
attributes
[
3
]
->
getValue
(),
$locked
];
...
...
This diff is collapsed.
Click to expand it.
plugins/personal/generic/class_user.inc
+
4
−
4
View file @
74ae1d63
...
...
@@ -405,7 +405,7 @@ class user extends simplePlugin
// Get the hash of current data before modifications.
global
$config
;
$ldap
=
$config
->
get_ldap_link
();
$currentSnapHash
=
md5
(
$ldap
->
generateLdif
(
$this
->
dn
,
'(!(objectClass=gosaDepartment))'
,
'sub'
));
$currentSnapHash
=
md5
(
(
string
)
$ldap
->
generateLdif
(
$this
->
dn
,
'(!(objectClass=gosaDepartment))'
,
'sub'
));
// Verify if current snap hash already exist in the list of existing snapshots - not taking a snap if it exists.
$snapshotHandler
=
new
SnapshotHandler
();
...
...
@@ -513,7 +513,7 @@ class user extends simplePlugin
if
(
isset
(
$attrs
[
'pwdHistory'
][
0
]))
{
unset
(
$attrs
[
'pwdHistory'
][
'count'
]);
foreach
(
$attrs
[
'pwdHistory'
]
as
$pwdHistory
)
{
$pwdHistory
=
explode
(
'#'
,
$pwdHistory
,
4
);
$pwdHistory
=
explode
(
'#'
,
(
string
)
$pwdHistory
,
4
);
$method
=
passwordMethod
::
get_method
(
$pwdHistory
[
3
],
$user
);
if
((
$method
!==
NULL
)
&&
$method
->
checkPassword
(
$new_password
,
$pwdHistory
[
3
]))
{
return
_
(
'Password is in history of old passwords'
);
...
...
@@ -537,9 +537,9 @@ class user extends simplePlugin
return
_
(
'The passwords you\'ve entered as "New password" and "Repeated new password" do not match.'
);
}
elseif
(
$new_password
==
''
)
{
return
msgPool
::
required
(
_
(
'New password'
));
}
elseif
(
$check_differ
&&
(
mb_substr
(
$current_password
,
0
,
$differ
)
==
mb_substr
(
$new_password
,
0
,
$differ
)))
{
}
elseif
(
$check_differ
&&
(
mb_substr
(
(
string
)
$current_password
,
0
,
$differ
)
==
mb_substr
(
(
string
)
$new_password
,
0
,
$differ
)))
{
return
_
(
'The password used as new and current are too similar.'
);
}
elseif
(
$check_length
&&
(
mb_strlen
(
$new_password
)
<
$length
))
{
}
elseif
(
$check_length
&&
(
mb_strlen
(
(
string
)
$new_password
)
<
$length
))
{
return
_
(
'The password used as new is too short.'
);
}
elseif
(
!
passwordMethod
::
is_harmless
(
$new_password
))
{
return
_
(
'The password contains possibly problematic Unicode characters!'
);
...
...
This diff is collapsed.
Click to expand it.
plugins/personal/roles/class_userRoles.inc
+
2
−
2
View file @
74ae1d63
...
...
@@ -214,7 +214,7 @@ class userRoles extends simplePlugin
$warning
->
display
();
}
}
}
catch
(
NonExistingLdapNodeException
$e
)
{
}
catch
(
NonExistingLdapNodeException
)
{
/* Ignore deleted groups */
}
}
...
...
@@ -241,7 +241,7 @@ class userRoles extends simplePlugin
$warning
->
display
();
}
}
}
catch
(
NonExistingLdapNodeException
$e
)
{
}
catch
(
NonExistingLdapNodeException
)
{
/* Ignore deleted roles */
}
}
...
...
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