Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
James Lowden
OpenLDAP
Commits
49cefcc3
Commit
49cefcc3
authored
15 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
Fully parse undefined substring filters so they can be logged
parent
23fc709e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/filter.c
+16
-12
16 additions, 12 deletions
servers/slapd/filter.c
with
16 additions
and
12 deletions
servers/slapd/filter.c
+
16
−
12
View file @
49cefcc3
...
...
@@ -348,7 +348,7 @@ get_ssa(
{
ber_tag_t
tag
;
ber_len_t
len
;
ber_tag_
t
rc
;
in
t
rc
;
struct
berval
desc
,
value
,
nvalue
;
char
*
last
;
SubstringsAssertion
ssa
;
...
...
@@ -385,17 +385,15 @@ get_ssa(
rc
=
LDAP_PROTOCOL_ERROR
;
/* If there is no substring matching rule, there's nothing
* we can do with this filter. But we continue to parse it
* for logging purposes.
*/
if
(
ssa
.
sa_desc
->
ad_type
->
sat_substr
==
NULL
)
{
for
(
tag
=
ber_first_element
(
ber
,
&
len
,
&
last
);
tag
!=
LBER_DEFAULT
;
tag
=
ber_next_element
(
ber
,
&
len
,
last
)
)
{
/* eat all */
rc
=
ber_scanf
(
ber
,
"x"
);
}
rc
=
LDAP_INVALID_SYNTAX
;
goto
return_error
;
f
->
f_choice
|=
SLAPD_FILTER_UNDEFINED
;
Debug
(
LDAP_DEBUG_FILTER
,
"get_ssa: no substring matching rule for attributeType %s
\n
"
,
desc
.
bv_val
,
0
,
0
);
}
for
(
tag
=
ber_first_element
(
ber
,
&
len
,
&
last
);
...
...
@@ -457,7 +455,13 @@ get_ssa(
rc
=
asserted_value_validate_normalize
(
ssa
.
sa_desc
,
ssa
.
sa_desc
->
ad_type
->
sat_equality
,
usage
,
&
value
,
&
nvalue
,
text
,
op
->
o_tmpmemctx
);
if
(
rc
!=
LDAP_SUCCESS
)
goto
return_error
;
if
(
rc
!=
LDAP_SUCCESS
)
{
f
->
f_choice
|=
SLAPD_FILTER_UNDEFINED
;
Debug
(
LDAP_DEBUG_FILTER
,
"get_ssa: illegal value for attributeType %s (%d) %s
\n
"
,
desc
.
bv_val
,
rc
,
*
text
);
ber_dupbv_x
(
&
nvalue
,
&
value
,
op
->
o_tmpmemctx
);
}
switch
(
tag
)
{
case
LDAP_SUBSTRING_INITIAL
:
...
...
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