mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
Sanitise input variables
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1383793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
*/
|
||||
package org.apache.struts2.showcase.model;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
@@ -47,7 +49,7 @@ public class Skill implements IdEntity {
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
this.name = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(name));
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
@@ -55,7 +57,7 @@ public class Skill implements IdEntity {
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
this.description = StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(description));
|
||||
}
|
||||
|
||||
public Serializable getId() {
|
||||
|
||||
Reference in New Issue
Block a user