mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-27 00:56:36 +02: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:
parent
c1bad98702
commit
168c21bb27
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue