[java-plugin-storage-jdbc] 05/06: JJDBC-2 Add case sensitivity testing to verification
Rod Widdowson
rdw at steadingsoftware.com
Sun Jun 5 14:20:06 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-plugin-storage-jdbc.
View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-storage-jdbc.git;a=commit;h=4f0d9fb76d4561e8f3e2a3af8b8bfcb1829cb829
commit 4f0d9fb76d4561e8f3e2a3af8b8bfcb1829cb829
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Jun 5 15:17:21 2022 +0100
JJDBC-2 Add case sensitivity testing to verification
https://shibboleth.atlassian.net/browse/JJDBC-2
---
.../plugin/storage/jdbc/impl/JDBCStorageService.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
index e1b093d..364a9f8 100644
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
@@ -1050,13 +1050,22 @@ public final class JDBCStorageService extends AbstractStorageService implements
*/
private void verifyDatabase() throws IOException, ComponentInitializationException {
create(VERIFY_STRING, VERIFY_STRING, VERIFY_STRING, System.currentTimeMillis() + 10 * 60 * 1000);
- final StorageRecord<?> record = read(VERIFY_STRING, VERIFY_STRING);
+ StorageRecord<?> record = read(VERIFY_STRING, VERIFY_STRING);
if (record == null) {
throw new ComponentInitializationException("Insert into database failed");
}
if (!VERIFY_STRING.equals(record.getValue())) {
throw new ComponentInitializationException("Value read back was incorrect");
}
+ final String lower = VERIFY_STRING.toUpperCase();
+ record = read(VERIFY_STRING, lower);
+ if (record != null) {
+ throw new ComponentInitializationException("Key Column is Case Insensitive");
+ }
+ record = read(lower, VERIFY_STRING);
+ if (record != null) {
+ throw new ComponentInitializationException("Context Column is Case Insensitive");
+ }
delete(VERIFY_STRING, VERIFY_STRING);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list