|
67 | 67 | import com.topcoder.util.sql.databaseabstraction.CustomResultSet; |
68 | 68 | import com.topcoder.util.sql.databaseabstraction.InvalidCursorStateException; |
69 | 69 | import com.topcoder.util.sql.databaseabstraction.NullColumnValueException; |
| 70 | +import org.owasp.encoder.Encode; |
70 | 71 |
|
71 | 72 | /** |
72 | 73 | * <p> |
@@ -5985,13 +5986,15 @@ private void createProjectProperties(Long projectId, Project project, Map idValu |
5985 | 5986 | for (Iterator it = idValueMap.entrySet().iterator(); it.hasNext();) { |
5986 | 5987 | Entry entry = (Entry) it.next(); |
5987 | 5988 |
|
| 5989 | + Long key = (Long) entry.getKey(); |
| 5990 | + String value = (String) entry.getValue(); |
| 5991 | + value = Encode.forHtml(value); |
5988 | 5992 | // insert the project property into database |
5989 | | - Object[] queryArgs = new Object[] {projectId, entry.getKey(), |
5990 | | - entry.getValue(), operator, operator }; |
| 5993 | + Object[] queryArgs = new Object[] {projectId, key, |
| 5994 | + value, operator, operator }; |
5991 | 5995 | Helper.doDMLQuery(preparedStatement, queryArgs); |
5992 | 5996 |
|
5993 | | - auditProjectInfo(conn, projectId, project, AUDIT_CREATE_TYPE, (Long) entry.getKey(), |
5994 | | - (String) entry.getValue()); |
| 5997 | + auditProjectInfo(conn, projectId, project, AUDIT_CREATE_TYPE, key, value); |
5995 | 5998 | } |
5996 | 5999 |
|
5997 | 6000 | } catch (SQLException e) { |
|
0 commit comments