Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33217375
D12389.1768555442.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12389.1768555442.diff
View Options
diff --git a/keyserver/src/socket/session-utils.js b/keyserver/src/socket/session-utils.js
--- a/keyserver/src/socket/session-utils.js
+++ b/keyserver/src/socket/session-utils.js
@@ -251,6 +251,18 @@
return { sessionContinued: false };
}
+ if (oldLastUpdate === 0 && viewer.sessionLastUpdated === 0) {
+ // If both oldLastUpdate and viewer.sessionLastUpdated are 0, that indicates
+ // either a fresh registration, or a fresh login following a policy update
+ // that requires acknowledgment. In the latter case, we don't want to leave
+ // oldLastUpdate as 0, as it might result in a lot of old updates being
+ // downloaded. So we make sure to use Date.now() for the new session, and
+ // return { sessionContinued: false } to make sure the client gets a
+ // stateSyncPayloadTypes.FULL.
+ await setNewSession(viewer, calendarQuery, Date.now());
+ return { sessionContinued: false };
+ }
+
let comparisonResult = null;
try {
comparisonResult = compareNewCalendarQuery(viewer, calendarQuery);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 9:24 AM (15 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5943297
Default Alt Text
D12389.1768555442.diff (1 KB)
Attached To
Mode
D12389: [keyserver] Make sure to reset session when lastUpdate is 0
Attached
Detach File
Event Timeline
Log In to Comment