[java-plugin-shibd] branch main updated: Harden caching against CriteriaSet modification by caller.
Codeberg
noreply at shibboleth.net
Mon Nov 16 21:11:14 UTC 2026
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/5bdf90bde25628b8a543189d2ffd7340eb1a017c
The following commit(s) were added to refs/heads/main by this push:
new 5bdf90b Harden caching against CriteriaSet modification by caller.
5bdf90b is described below
commit 5bdf90bde25628b8a543189d2ffd7340eb1a017c
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Nov 16 16:09:21 2026 -0500
Harden caching against CriteriaSet modification by caller.
---
.../sp/credential/AbstractStorageServiceCredentialResolver.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/credential/AbstractStorageServiceCredentialResolver.java b/sp-server-api/src/main/java/net/shibboleth/sp/credential/AbstractStorageServiceCredentialResolver.java
index 24a2899..58e37e8 100644
--- a/sp-server-api/src/main/java/net/shibboleth/sp/credential/AbstractStorageServiceCredentialResolver.java
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/credential/AbstractStorageServiceCredentialResolver.java
@@ -458,7 +458,10 @@ public abstract class AbstractStorageServiceCredentialResolver<T extends Credent
final List<Credential> toCache = new ArrayList<>();
resolved.forEach(toCache::add);
log.debug("CredentialResolver {}: Adding {} resolved credential(s) to cache", getId(), toCache.size());
- localCache.put(manipulatedCriteria, toCache);
+ // Copy the modified criteria one last time to avoid contamination if it's modified by caller.
+ final CriteriaSet cacheCriteria = new CriteriaSet();
+ cacheCriteria.addAll(manipulatedCriteria);
+ localCache.put(cacheCriteria, toCache);
return CollectionSupport.copyToList(toCache);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list