You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2020/07/10 11:04:50 UTC
[santuario-xml-security-java] 02/03: Log a warning when Reference
digest input bytes are null. This can happen in rare/odd scenarios where an
empty node-set is canonicalized (for example,
because of an incorrect XPath Transform expression).
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 2.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git
commit f1cc5993767d04d944d90da0db5417eec049e748
Author: Sean Mullan <se...@gmail.com>
AuthorDate: Thu Jul 9 13:35:04 2020 -0400
Log a warning when Reference digest input bytes are null. This can happen
in rare/odd scenarios where an empty node-set is canonicalized (for example,
because of an incorrect XPath Transform expression).
---
.../java/org/apache/jcp/xml/dsig/internal/dom/DOMReference.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMReference.java b/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMReference.java
index e308e2c..9965ba9 100644
--- a/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMReference.java
+++ b/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMReference.java
@@ -1,5 +1,5 @@
/**
- * Licensed to the Apache Software Foundation (ASF) under one
+ *r Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
@@ -529,6 +529,10 @@ public final class DOMReference extends DOMStructure
} else {
xi.updateOutputStream(os);
}
+ } else {
+ LOG.warn("The input bytes to the digest operation are null. " +
+ "This may be due to a problem with the Reference URI " +
+ "or its Transforms.");
}
os.flush();
if (cache != null && cache) {