Skip to content

E0426: Personal values sent to the browser ​

web.Browser(p) sends p's variables to the browser, where islands and the page's scripts read them. A processor that reads the signed-in user — it calls into auth, directly or through the functions it calls — gives values about that visitor, which are theirs alone; web.Browser refuses it unless it is wrapped in web.Personal to say so. Reported by vuka vet and at boot.

Wrong ​

go
web.ContextProcessors(web.Browser(users.Context)) // users.Context reads auth.Current
go
web.ContextProcessors(web.Browser(web.Personal(users.Context)))

A permission list (auth.Perms) is never sent, web.Personal or not. See context processors.

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.