[java-plugin-shibd] branch main updated: Adjustments to session cache operations.
Codeberg
noreply at shibboleth.net
Wed Dec 10 19:41:52 UTC 2025
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-plugin-shibd.
View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd/commit/2b5cc69047482dbe4a00359ece6a2747b28b9b49
The following commit(s) were added to refs/heads/main by this push:
new 2b5cc69 Adjustments to session cache operations.
2b5cc69 is described below
commit 2b5cc69047482dbe4a00359ece6a2747b28b9b49
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Dec 10 14:41:41 2025 -0500
Adjustments to session cache operations.
---
.../net/shibboleth/sp/profile/impl/DoSessionCacheOperation.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DoSessionCacheOperation.java b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DoSessionCacheOperation.java
index fc64beb..240661b 100644
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DoSessionCacheOperation.java
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DoSessionCacheOperation.java
@@ -385,7 +385,7 @@ public class DoSessionCacheOperation extends AbstractAgentAction {
// "ver" - new version if update succeeded
final String key = input.getmember(KEY).string();
- Long version = input.getmember(VERSION).longinteger();
+ Integer version = input.getmember(VERSION).integer();
if (key == null || version == null || version <= 0) {
log.warn("{} Missing required '{}' or '{}' structure member", getLogPrefix(), KEY, VERSION);
ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_MESSAGE);
@@ -415,12 +415,13 @@ public class DoSessionCacheOperation extends AbstractAgentAction {
// TODO: Encrypt?
try {
- version = storageService.updateWithVersion(version, STORAGE_CONTEXT, ensureAgent().getId() + '!' + key,
+ Long newver = storageService.updateWithVersion(version, STORAGE_CONTEXT, ensureAgent().getId() + '!' + key,
value, exp);
- if (version != null) {
+ if (newver != null) {
log.debug("{} Updated session ({}) to version ({})", getLogPrefix(), key, version);
final DDF output = new DDF().structure();
- output.addmember(VERSION).longinteger(version);
+ // There's no real chance this will ever overflow, as session updates are rare.
+ output.addmember(VERSION).integer(newver.intValue());
ensureAgentRequestContext().setOutput(output);
} else {
// Send back an empty response.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list