A browser can attach a session cookie to a request that a different site caused it to send. The cookie tells the server which session arrived. It doesn't prove that the account holder intended the change. A synchronizer token adds a value that the application checks against the server session before a state-changing operation.
Compare the exact submitted token with a nonempty session token. Checking that some token exists accepts an attacker's token, while comparing two missing values can accidentally allow the request. A read-only GET can follow a separate policy when it truly makes no changes. These exercises model token validation through saved requests, not browser cookie rules. In production, use framework CSRF protection, generate unpredictable tokens and assess SameSite cookies as another control. Keep ordinary form and custom-header submissions working.
Require a nonempty token bound to the session before a browser write.