Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
d9d49d64
Commit
d9d49d64
authored
8 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Plain Diff
Merge pull request #1552 from splitbrain/pregreplaceevalmodifier
preg_replace eval modifier
parents
9a9a364c
f4208bec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/plugins/authad/adLDAP/classes/adLDAPUtils.php
+11
-7
11 additions, 7 deletions
lib/plugins/authad/adLDAP/classes/adLDAPUtils.php
lib/plugins/authldap/auth.php
+4
-0
4 additions, 0 deletions
lib/plugins/authldap/auth.php
with
15 additions
and
7 deletions
lib/plugins/authad/adLDAP/classes/adLDAPUtils.php
+
11
−
7
View file @
d9d49d64
...
...
@@ -99,19 +99,23 @@ class adLDAPUtils {
* @author Port by Andreas Gohr <andi@splitbrain.org>
* @return string
*/
public
function
ldapSlashes
(
$str
){
return
preg_replace
(
'/([\x00-\x1F\*\(\)\\\\])/e'
,
'"\\\\\".join("",unpack("H2","$1"))'
,
$str
);
protected
function
ldapSlashes
(
$str
)
{
// see https://github.com/adldap/adLDAP/issues/22
return
preg_replace_callback
(
'/([\x00-\x1F\*\(\)\\\\])/'
,
function
(
$matches
)
{
return
"
\\
"
.
join
(
""
,
unpack
(
"H2"
,
$matches
[
1
]));
},
$str
);
}
/**
* Converts a string GUID to a hexdecimal value so it can be queried
*
*
* @param string $strGUID A string representation of a GUID
* @return string
*/
public
function
strGuidToHex
(
$strGUID
)
public
function
strGuidToHex
(
$strGUID
)
{
$strGUID
=
str_replace
(
'-'
,
''
,
$strGUID
);
...
...
This diff is collapsed.
Click to expand it.
lib/plugins/authldap/auth.php
+
4
−
0
View file @
d9d49d64
...
...
@@ -275,6 +275,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
/**
* Definition of the function modifyUser in order to modify the password
*
* @param string $user nick of the user to be changed
* @param array $changes array of field/value pairs to be changed (password will be clear text)
* @return bool true on success, false on error
*/
function
modifyUser
(
$user
,
$changes
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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