This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 3_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/3_0_X by this push:
     new f0fa559c6c Further restricting HTML content rejection for text fields
f0fa559c6c is described below

commit f0fa559c6c459eaa29f78ce12263c425f0763cba
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Wed Aug 21 10:59:47 2024 +0200

    Further restricting HTML content rejection for text fields
---
 .../syncope/client/ui/commons/markup/html/form/TextFieldPanel.java    | 2 +-
 .../apache/syncope/client/console/wizards/any/AnnotatedBeanPanel.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/TextFieldPanel.java
 
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/TextFieldPanel.java
index d328e0546f..eb219b3d57 100644
--- 
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/TextFieldPanel.java
+++ 
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/TextFieldPanel.java
@@ -28,7 +28,7 @@ public abstract class TextFieldPanel extends 
FieldPanel<String> {
 
     private static final long serialVersionUID = 1708195999215061362L;
 
-    private static final Pattern HTML_PATTERN = 
Pattern.compile("<(\"[^\"]*\"|'[^']*'|[^'\">])*>");
+    private static final Pattern HTML_PATTERN = Pattern.compile(".*<.*");
 
     public TextFieldPanel(final String id, final String name, final 
IModel<String> model) {
         super(id, name, model);
diff --git 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnnotatedBeanPanel.java
 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnnotatedBeanPanel.java
index c9a232ac96..d4c84b78e4 100644
--- 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnnotatedBeanPanel.java
+++ 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnnotatedBeanPanel.java
@@ -58,7 +58,7 @@ public class AnnotatedBeanPanel extends Panel {
         // ------------------------
         // Last modifier
         // ------------------------
-        add(new Label("lastModifier", new Model<>(anyTO.getLastModifier() != 
null
+        add(new Label("lastModifier", new Model<>(anyTO.getLastModifier() == 
null
                 ? StringUtils.EMPTY : anyTO.getLastModifier())));
         // ------------------------
 
@@ -72,7 +72,7 @@ public class AnnotatedBeanPanel extends Panel {
         // ------------------------
         // Last modifier
         // ------------------------
-        add(new Label("lastChangeContext", new 
Model<>(anyTO.getLastChangeContext() != null
+        add(new Label("lastChangeContext", new 
Model<>(anyTO.getLastChangeContext() == null
                 ? StringUtils.EMPTY : anyTO.getLastChangeContext())));
         // ------------------------
     }

Reply via email to