Protect History Display 29/49029/1
authorInstrumental <jonathan.gathman@att.com>
Thu, 24 May 2018 21:33:59 +0000 (16:33 -0500)
committerInstrumental <jonathan.gathman@att.com>
Thu, 24 May 2018 21:34:02 +0000 (16:34 -0500)
Issue-ID: AAF-324
Change-Id: I8829afdab7ae1baee1d6ebf10708997074b3aaa9
Signed-off-by: Instrumental <jonathan.gathman@att.com>
auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsHistory.java
auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PermHistory.java
auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleHistory.java

index 1bffbb6..96ec002 100644 (file)
@@ -196,10 +196,11 @@ public class NsHistory extends Page {
                                                                        String user = i.getUser();
                                                                        AbsCell userCell = new TextCell(user);
                                                                        
+                                                                       String memo = i.getMemo().replace("<script>", "&lt;script&gt;").replace("</script>", "&lt;/script&gt;");
                                                                        rv.add(new AbsCell[] {
                                                                                        new TextCell(i.getTimestamp().toGregorianCalendar().getTime().toString()),
                                                                                        userCell,
-                                                                                       new TextCell(i.getMemo())
+                                                                                       new TextCell(memo)
                                                                        });
                                                                }
                                                        } finally {
index 64a0db1..b7a9960 100644 (file)
@@ -207,11 +207,11 @@ public class PermHistory extends Page {
                                                                for (Item i : histItems) {
                                                                        String user = i.getUser();
                                                                        AbsCell userCell = new TextCell(user);
-                                                                       
+                                                                       String memo = i.getMemo().replace("<script>", "&lt;script&gt;").replace("</script>", "&lt;/script&gt;");
                                                                        rv.add(new AbsCell[] {
                                                                                        new TextCell(i.getTimestamp().toGregorianCalendar().getTime().toString()),
                                                                                        userCell,
-                                                                                       new TextCell(i.getMemo())
+                                                                                       new TextCell(memo)
                                                                        });
                                                                }
                                                                
index 7b07b60..5f7625a 100644 (file)
@@ -38,7 +38,6 @@ import org.onap.aaf.auth.gui.Page;
 import org.onap.aaf.auth.gui.Table;
 import org.onap.aaf.auth.gui.Table.Cells;
 import org.onap.aaf.auth.gui.table.AbsCell;
-import org.onap.aaf.auth.gui.table.RefCell;
 import org.onap.aaf.auth.gui.table.TableData;
 import org.onap.aaf.auth.gui.table.TextCell;
 import org.onap.aaf.cadi.CadiException;
@@ -195,11 +194,12 @@ public class RoleHistory extends Page {
                                                                        for (Item i : histItems) {
                                                                                String user = i.getUser();
                                                                                AbsCell userCell = new TextCell(user);
-                                                                               
+
+                                                                               String memo = i.getMemo().replace("<script>", "&lt;script&gt;").replace("</script>", "&lt;/script&gt;");
                                                                                rv.add(new AbsCell[] {
                                                                                                new TextCell(i.getTimestamp().toGregorianCalendar().getTime().toString()),
                                                                                                userCell,
-                                                                                               new TextCell(i.getMemo())
+                                                                                               new TextCell(memo)
                                                                                });
                                                                        }
                                                                } else {