[java-plugin-storage-jdbc] branch main updated: JJDBC-33 Enforce limits on context and key size

Codeberg noreply at shibboleth.net
Mon Jul 13 09:33:05 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-storage-jdbc.

View the commit online:
https://codeberg.org/Shibboleth/java-plugin-storage-jdbc/commit/95f7e2632a27fe729992c0348d3d2eb85afe14a5

The following commit(s) were added to refs/heads/main by this push:
     new 95f7e26   JJDBC-33 Enforce limits on context and key size
95f7e26 is described below

commit 95f7e2632a27fe729992c0348d3d2eb85afe14a5
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jul 13 10:34:01 2026 +0100

     JJDBC-33 Enforce limits on context and key size
    
    https://shibboleth.atlassian.net/browse/JJDBC-33
    
    Force the use of  UTF-8 when checking the 'long string' size in the test
    (mirrors code in thedriver itself)
---
 .../shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java b/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java
index c47d904..c2c2a53 100644
--- a/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java
+++ b/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java
@@ -20,6 +20,7 @@ import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
 import java.io.IOException;
+import java.nio.charset.Charset;
 import java.security.SecureRandom;
 import java.sql.Connection;
 import java.sql.SQLException;
@@ -375,7 +376,7 @@ public class JDBCStorageServiceTest extends StorageServiceTest {
         }
         final String longString = builder.toString();
         assertTrue(longString.length() < 255);
-        assertTrue(longString.getBytes().length > 255);
+        assertTrue(longString.getBytes(Charset.forName("UTF8")).length > 255);
 
         final Long then = System.currentTimeMillis() + 300000;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list