Download Latest Version Version 2.4.0 source code.zip (484.4 kB)
Home / v2.3.2
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-11-04 2.0 kB
Version 2.3.2 source code.tar.gz 2026-11-04 395.9 kB
Version 2.3.2 source code.zip 2026-11-04 474.0 kB
Totals: 3 Items   871.8 kB 0

The direct provider no longer gives a 40-character hex username another user's id. It built the user id with token.HashID, which returns a 40-character hex value unchanged, so a username equal to the SHA1 of another username got that user's id: 522b276a356bdf39013dfabea2cd43e141ecc9e8 logged in with the same id as alice. An application that keys records or permissions on User.ID treated the two logins as one account. Exploiting it needs a username policy that accepts 40-character hex names and a known victim username. The default id is now the plain SHA1 of the username. Reported privately by Rathnadeepan (@HotWater-015), fixed in [#324].

One behaviour change. With the default id mapping, usernames of exactly 40 hex characters get new ids, so records keyed on the old ids need a migration. Every other username keeps its id. A custom UserIDFunc works as before: its result still goes through HashID, so it must return an id the application controls, never the raw username.

Logout now clears a JWT cookie whose name starts with __Http- or __Host-Http-. Reset expired the cookie without HttpOnly, and Chromium rejects a Set-Cookie for such a name without it, so the session cookie survived sign-out. The removal header now carries HttpOnly for every deployment (#320).

New Opts.PartitionedCookies marks the auth cookies Partitioned, so an application embedded in a page on another site keeps its session when the browser blocks third-party cookies, and the JWT cookie stays HttpOnly. It requires SecureCookies, and a cross-site frame also needs SameSiteCookie: http.SameSiteNoneMode. It helps only the logins that set the cookie inside the frame: direct, telegram and email code. An OAuth callback runs in a popup with its own top-level site, so with the option on, an OAuth session no longer reaches the frame (#318 by @paskal).

Also in this release: a README section on getting the user email from Google (#323) and a README typo fix (#321 by @hamidzr).

Source: README.md, updated 2026-11-04