Hash the web password and revoke sessions server-side
Store a scrypt hash (migrating a plaintext password without changing it), sign sessions with a generation that ./password and --revoke-all rotate, make logout a same-origin POST that revokes the token, add sign out everywhere, and close proxied websockets whose session ends. Enforce a strength rule for new passwords, back off logins per client and server-wide, check Origin on login, tighten next, add security headers and a __Host- cookie over https.
This commit is contained in:
@@ -75,7 +75,7 @@ export function boundedRequest(
|
||||
export function sessionCookie(response) {
|
||||
return (response.headers["set-cookie"] ?? [])
|
||||
.map((value) => value.split(";")[0])
|
||||
.filter((value) => value.startsWith("pipelines_session="))
|
||||
.filter((value) => value.startsWith("pipelines_session=") || value.startsWith("__Host-pipelines_session="))
|
||||
.join("; ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user