Sign-ins finish only in the browser that started them
A Core sign-in, and a posting account's or Search Console's OAuth sign-in, now sets a short-lived cookie whose hash the flow keeps on the server. The callback refuses one without it (constant-time compare), clears the cookie either way, and the flow is used up regardless. This stops login CSRF: a callback URL brought to another browser signs nobody in. The cookie uses the __Host- prefix over https, so its Path is "/". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,8 +33,9 @@ type Pending struct {
|
||||
Verifier string // PKCE, X only
|
||||
RedirectURI string
|
||||
Started time.Time
|
||||
For int64 `json:",omitempty"` // a person signing in their own posting account; 0: the company's
|
||||
Team int64 `json:",omitempty"` // the team it was started in (multi-tenant)
|
||||
For int64 `json:",omitempty"` // a person signing in their own posting account; 0: the company's
|
||||
Team int64 `json:",omitempty"` // the team it was started in (multi-tenant)
|
||||
Browser string `json:",omitempty"` // the hash of the cookie that ties it to a browser
|
||||
}
|
||||
|
||||
// --- X ---
|
||||
|
||||
Reference in New Issue
Block a user