joerghoh commented on code in PR #53:
URL: 
https://github.com/apache/sling-org-apache-sling-xss/pull/53#discussion_r1919902556


##########
src/main/java/org/apache/sling/xss/impl/xml/Regexp.java:
##########
@@ -27,12 +27,19 @@ public class Regexp {
     private String name;
     private String value;
 
+    private Pattern pattern;
+
     @JsonCreator
     public Regexp(@JacksonXmlProperty(localName = "name", isAttribute = true) 
String name,
             @JacksonXmlProperty(localName = "value", isAttribute = true) 
String regexp) {
 
         this.name = name;
         this.value = regexp;
+
+        if (regexp != null) {

Review Comment:
   From what I see this structure is parsed via 
[Attribute.java](https://github.com/apache/sling-org-apache-sling-xss/blob/fb8a71fedffb4da0706cb60328244759547fbec4/src/main/java/org/apache/sling/xss/impl/xml/Attribute.java#L49)
 and there ``null`` Patterns are filtered out ([line 
63](https://github.com/apache/sling-org-apache-sling-xss/blob/fb8a71fedffb4da0706cb60328244759547fbec4/src/main/java/org/apache/sling/xss/impl/xml/Attribute.java#L63)).
   
   There are other instances of regexp tags, where ``getPattern()`` is called 
without filtering for null results.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to