Language: Go
Label: vulnerable
CWE: CWE-287 \u2014 Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

Code:
func New(ds model.DataStore, broker events.Broker) *Server {
	s := &Server{ds: ds, broker: broker}
	auth.Init(s.ds)
	initialSetup(ds)
	s.initRoutes()
	s.mountAuthenticationRoutes()
	s.mountRootRedirector()
	checkFfmpegInstallation()
	checkExternalCredentials()
	return s
}