mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
Make sure that effective domain actually is descendant of rp_id (#618)
This commit is contained in:
parent
0f4189a57e
commit
492cb653e8
|
@ -178,7 +178,10 @@ impl IdmServer {
|
|||
})
|
||||
.and_then(|url| {
|
||||
let valid = url.domain().map(|effective_domain| {
|
||||
effective_domain.ends_with(&rp_id)
|
||||
// We need to prepend the '.' here to ensure that myexample.com != example.com,
|
||||
// rather than just ends with.
|
||||
effective_domain.ends_with(&format!(".{}", rp_id))
|
||||
|| effective_domain == rp_id
|
||||
}).unwrap_or(false);
|
||||
|
||||
if valid {
|
||||
|
|
Loading…
Reference in a new issue