[java-support] 18/26: Shore up node prefix checking.

Scott Cantor cantor.2 at osu.edu
Tue Apr 12 14:38:43 UTC 2022


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch dev/JSPT-111
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=c85b1ae642358b2ec3d774d2945824b5317f90fa

commit c85b1ae642358b2ec3d774d2945824b5317f90fa
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Mar 2 14:47:47 2022 -0500

    Shore up node prefix checking.
---
 .../java/net/shibboleth/utilities/java/support/security/DataSealer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/net/shibboleth/utilities/java/support/security/DataSealer.java b/src/main/java/net/shibboleth/utilities/java/support/security/DataSealer.java
index 1440cd7..c50307b 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/security/DataSealer.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/security/DataSealer.java
@@ -232,7 +232,7 @@ public class DataSealer extends AbstractInitializableComponent {
         
         try {
             final byte[] in;
-            if (wrapped.startsWith(MAGIC_STRING)) {
+            if (nodePrefix != null && wrapped.startsWith(MAGIC_STRING)) {
                 if (wrapped.regionMatches(MAGIC_STRING.length(), nodePrefix, 0, nodePrefix.length())) {
                     in = decoder.decode(wrapped.substring(MAGIC_STRING.length() +
                             nodePrefix.length()).getBytes(StandardCharsets.UTF_8));

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


More information about the commits mailing list