mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-11-04 01:25:06 +01:00 
			
		
		
		
	Merge branch 'hotfix' of https://github.com/ClusterCockpit/cc-backend into hotfix
This commit is contained in:
		@@ -317,7 +317,7 @@ func (auth *Authentication) Login(
 | 
				
			|||||||
	onfailure func(rw http.ResponseWriter, r *http.Request, loginErr error)) http.Handler {
 | 
						onfailure func(rw http.ResponseWriter, r *http.Request, loginErr error)) http.Handler {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
 | 
						return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
		var err error = errors.New("no authenticator applied")
 | 
							err := errors.New("no authenticator applied")
 | 
				
			||||||
		username := r.FormValue("username")
 | 
							username := r.FormValue("username")
 | 
				
			||||||
		user := (*User)(nil)
 | 
							user := (*User)(nil)
 | 
				
			||||||
		if username != "" {
 | 
							if username != "" {
 | 
				
			||||||
@@ -334,7 +334,7 @@ func (auth *Authentication) Login(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			user, err = authenticator.Login(user, rw, r)
 | 
								user, err = authenticator.Login(user, rw, r)
 | 
				
			||||||
			if err != nil {
 | 
								if err != nil {
 | 
				
			||||||
				log.Warnf("user '%s' login failed: %s", user.Username, err.Error())
 | 
									log.Warnf("user login failed: %s", err.Error())
 | 
				
			||||||
				onfailure(rw, r, err)
 | 
									onfailure(rw, r, err)
 | 
				
			||||||
				return
 | 
									return
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user