Initial upload to Gitea

This commit is contained in:
antonn committed 2026-11-30 16:32:37 +00:00
1 parent 78193254ad
commit 8478998cae
1485 files changed
+461025 -42348

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
"use strict";
const crypto = require("node:crypto");
function getRememberLoginFingerprint(user) {
if (!user || !user.password) return "";
// adpanel:remember-account-generation - a missed revocation cannot restore
// a saved login after suspension ends or after credentials are reverted.
return crypto
.createHash("sha256")
.update(String(user.password || ""))
.update("\n")
.update(String(user.secret || ""))
.update("\naccount-epoch:")
.update(user.session_epoch == null ? "legacy" : String(user.session_epoch))
.digest("hex");
}
module.exports = { getRememberLoginFingerprint };