feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+7 -7
View File
@@ -169,7 +169,7 @@ func publishCreatedUserSession(session *UserSession, cacheDeadline time.Time) er
if errors.Is(err, ErrUserSessionInactive) {
return err
}
common.SysLog("failed to populate newly created user session cache: " + err.Error())
common.SysLog(common.LogText("failed to populate newly created user session cache: %s", err.Error()))
}
return nil
}
@@ -255,7 +255,7 @@ func GetUserSessionCached(sid string) (*UserSession, error) {
if errors.Is(err, ErrUserSessionInactive) {
return nil, err
}
common.SysLog("failed to synchronously populate user session cache: " + err.Error())
common.SysLog(common.LogText("failed to synchronously populate user session cache: %s", err.Error()))
}
}
return session, nil
@@ -505,7 +505,7 @@ func RotateUserSessionRefresh(userID int, sid, presentedHash, nextHash string, n
} else if errors.Is(err, ErrUserSessionInactive) {
return nil, err
} else {
common.SysLog("failed to update rotated user session cache: " + err.Error())
common.SysLog(common.LogText("failed to update rotated user session cache: %s", err.Error()))
}
}
return &session, nil
@@ -542,7 +542,7 @@ func RotateUserSessionRefresh(userID int, sid, presentedHash, nextHash string, n
session.RevokedAt = now
session.RevokedReason = "refresh_reuse"
if err := writeUserSessionCache(session.cacheEntry(), time.Time{}); err != nil {
common.SysLog("failed to cache refresh-reuse session revoke: " + err.Error())
common.SysLog(common.LogText("failed to cache refresh-reuse session revoke: %s", err.Error()))
}
return nil, ErrUserSessionRefreshReuse
}
@@ -596,7 +596,7 @@ func RevokeUserSession(userID int, sid, reason string) (bool, error) {
candidate.RevokedAt = now
candidate.RevokedReason = reason
if err := writeUserSessionCache(candidate.cacheEntry(), time.Time{}); err != nil {
common.SysLog("failed to finalize user session revoke tombstone: " + err.Error())
common.SysLog(common.LogText("failed to finalize user session revoke tombstone: %s", err.Error()))
}
}
return revoked, nil
@@ -652,7 +652,7 @@ func RevokeUserSessionByRefreshHash(sid, presentedHash, reason string) (bool, er
}
if revoked {
if err := writeUserSessionCache(session.cacheEntry(), time.Time{}); err != nil {
common.SysLog("failed to finalize refresh-authenticated session revoke tombstone: " + err.Error())
common.SysLog(common.LogText("failed to finalize refresh-authenticated session revoke tombstone: %s", err.Error()))
}
}
return revoked, nil
@@ -775,7 +775,7 @@ func revokeUserSessions(userID int, excludedSID, reason string) (int64, error) {
revoked[i].RevokedAt = now
revoked[i].RevokedReason = reason
if err := writeUserSessionCache(revoked[i].cacheEntry(), time.Time{}); err != nil {
common.SysLog("failed to finalize bulk user session revoke tombstone: " + err.Error())
common.SysLog(common.LogText("failed to finalize bulk user session revoke tombstone: %s", err.Error()))
}
}
}