You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by GitBox <gi...@apache.org> on 2021/09/02 16:10:53 UTC

[GitHub] [santuario-xml-security-java] seanjmullan commented on a change in pull request #58: SANTUARIO-577 - Introduce a system property to control if file/http r…

seanjmullan commented on a change in pull request #58:
URL: https://github.com/apache/santuario-xml-security-java/pull/58#discussion_r701231380



##########
File path: src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverContext.java
##########
@@ -51,4 +57,12 @@ public ResourceResolverContext(Attr attr, String baseUri, boolean secureValidati
         return properties;
     }
 
+    public boolean isSafeURIToResolve() {
+        if (allowUnsafeResourceResolving) {
+            return true;
+        }
+        boolean forbiddenURI = (uriToResolve != null && (uriToResolve.startsWith("file:") || uriToResolve.startsWith("http:")))

Review comment:
       Unless this is done somewhere else, I think you should lowercase `uriToResolve` (probably in the ctor) so that it also matches mixed/upper case schemes, ex "HTTP:".




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@santuario.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org