Enable CLI language-aware editing and reuse OIDC authentication
This commit is contained in:
1 parent
5821254535
commit
93f4ecb8f4
11 files changed
+264
-84
No files matched your search
@@ -164,7 +164,6 @@ func (s *Server) verifyCLIAuth(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
data["CLIUsername"] = principal.Username
|
||||
data["CLICSRF"] = cliConsentCSRF(token, id)
|
||||
data["CLITOTP"] = s.store.HasTOTP(principal.UUID)
|
||||
if r.Method == http.MethodPost {
|
||||
if !validBrowserMutationOrigin(r) || subtle.ConstantTimeCompare([]byte(r.PostForm.Get("csrf")), []byte(cliConsentCSRF(token, id))) != 1 {
|
||||
http.Error(w, "invalid approval origin or token", 403)
|
||||
|
||||
Reference in new issue
Block a user