mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
ldap wildcard handler, error if '*' attribute makes it to get_x_attribute
This commit is contained in:
parent
5150d8341f
commit
b7957f598b
@ -120,11 +120,10 @@ fn get_user_attribute(user: &User, attribute: &str, dn: &str) -> Result<Option<V
|
|||||||
// We ignore the operational attribute wildcard
|
// We ignore the operational attribute wildcard
|
||||||
"+" => return Ok(None),
|
"+" => return Ok(None),
|
||||||
"*" => {
|
"*" => {
|
||||||
warn!(
|
bail!(
|
||||||
"Matched {}, * should have been expanded into attribute list and * removed",
|
"Matched {}, * should have been expanded into attribute list and * removed",
|
||||||
attribute
|
attribute
|
||||||
);
|
)
|
||||||
return Ok(None);
|
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
warn!("Ignoring unrecognized group attribute: {}", attribute);
|
warn!("Ignoring unrecognized group attribute: {}", attribute);
|
||||||
@ -209,11 +208,10 @@ fn get_group_attribute(
|
|||||||
// We ignore the operational attribute wildcard
|
// We ignore the operational attribute wildcard
|
||||||
"+" => return Ok(None),
|
"+" => return Ok(None),
|
||||||
"*" => {
|
"*" => {
|
||||||
warn!(
|
bail!(
|
||||||
"Matched {}, * should have been expanded into attribute list and * removed",
|
"Matched {}, * should have been expanded into attribute list and * removed",
|
||||||
attribute
|
attribute
|
||||||
);
|
)
|
||||||
return Ok(None);
|
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
warn!("Ignoring unrecognized group attribute: {}", attribute);
|
warn!("Ignoring unrecognized group attribute: {}", attribute);
|
||||||
|
Loading…
Reference in New Issue
Block a user