this repo has no description

add error handling for missing OIDC issuer URL in signin, signout, and callback endpoints

Changed files
+15
cmd
+15
cmd/up.go
··· 523 523 } 524 524 525 525 if r.URL.Path == "/_smallweb/signin" { 526 + if me.oidcIssuerUrl == nil { 527 + http.Error(w, "oidc issuer url not set", http.StatusInternalServerError) 528 + return 529 + } 530 + 526 531 oauth2Config, err := me.Oauth2Config(r.Host) 527 532 if err != nil { 528 533 http.Error(w, fmt.Sprintf("failed to get oauth2 config: %v", err), http.StatusInternalServerError) ··· 568 573 } 569 574 570 575 if r.URL.Path == "/_smallweb/signout" { 576 + if me.oidcIssuerUrl == nil { 577 + http.Error(w, "oidc issuer url not set", http.StatusInternalServerError) 578 + return 579 + } 580 + 571 581 http.SetCookie(w, &http.Cookie{ 572 582 Name: "id_token", 573 583 Secure: true, ··· 597 607 } 598 608 599 609 if r.URL.Path == "/_smallweb/oauth/callback" { 610 + if me.oidcIssuerUrl == nil { 611 + http.Error(w, "oidc issuer url not set", http.StatusInternalServerError) 612 + return 613 + } 614 + 600 615 oauth2Config, err := me.Oauth2Config(r.Host) 601 616 if err != nil { 602 617 http.Error(w, fmt.Sprintf("failed to get oauth2 config: %v", err), http.StatusInternalServerError)