projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62d550d
)
Add more LDAP escaping rules from RFC 2253
author
aland
<aland>
Sun, 8 Apr 2007 07:14:45 +0000
(07:14 +0000)
committer
aland
<aland>
Sun, 8 Apr 2007 07:14:45 +0000
(07:14 +0000)
src/modules/rlm_ldap/rlm_ldap.c
patch
|
blob
|
history
diff --git
a/src/modules/rlm_ldap/rlm_ldap.c
b/src/modules/rlm_ldap/rlm_ldap.c
index
aa709cd
..
53c966c
100644
(file)
--- a/
src/modules/rlm_ldap/rlm_ldap.c
+++ b/
src/modules/rlm_ldap/rlm_ldap.c
@@
-848,7
+848,9
@@
static int ldap_escape_func(char *out, int outlen, const char *in)
/*
* Encode unsafe characters.
*/
- if (strchr("*=\\,()", *in)) {
+ if (((len == 0) &&
+ ((in[0] == ' ') || (in[0] == '#'))) ||
+ (strchr(",+\"\\<>;*=()", *in))) {
static const char hex[] = "0123456789abcdef";
/*