mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 05:06:53 +00:00
fix: Don't crash when the client URL doesn't have a domain
Having a URL with an IP literal, for example, is allowed
This commit is contained in:
1 parent
5bd1bedad0
commit
1ce1254514
2 files changed
+2
-2
No files matched your search
@@ -44,7 +44,7 @@ pub(crate) async fn authorize(
|
||||
.well_known
|
||||
.client
|
||||
.as_ref()
|
||||
.map(|s| s.domain().expect("well-known client should be a domain"));
|
||||
.map(|s| s.host_str().expect("well-known client should have a host"));
|
||||
let hostname = hostname.unwrap_or("Continuwuity");
|
||||
match oauth.authorization_header() {
|
||||
| None => {
|
||||
|
||||
@@ -47,7 +47,7 @@ pub(crate) async fn oidc_login(
|
||||
.well_known
|
||||
.client
|
||||
.as_ref()
|
||||
.map(|s| s.domain().expect("well-known client should have a domain"));
|
||||
.map(|s| s.host_str().expect("well-known client should have a host"));
|
||||
|
||||
let hostname = hostname.unwrap_or("Continuwuity");
|
||||
let authorization_query: AuthorizationQuery = query.into();
|
||||
|
||||
Reference in new issue
Block a user