fix: Validate OAuth HTTPS redirect URIs are subdomains of the client domain

This commit is contained in:
Ginger authored and Ellis Git committed 2026-11-02 00:44:02 +00:00
1 parent abf8f878bc
commit dc03f2136a
1 file changed
+9
+9
View File
@@ -81,6 +81,15 @@ impl ClientMetadata {
if !uri.username().is_empty() || uri.password().is_some() {
return Err("HTTPS redirect URIs must not contain credentials.");
}
if !uri
.domain()
.is_some_and(|domain| is_subdomain(domain, client_domain))
{
return Err(
"All HTTPS redirect URIs must be subdomains of the client URI."
);
}
},
| "http" if self.application_type == ApplicationType::Native => {
if uri