Skip to content

Commit 297bc7b

Browse files
authored
Merge pull request #870 from nimsara66/5.3.x-10121
Escape user given xml input field to prevent xss
2 parents a9d9184 + c4f0a92 commit 297bc7b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

components/event-publisher/org.wso2.carbon.event.publisher.ui/src/main/resources/web/eventpublisher/eventPublisher_details.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
~ See the License for the specific language governing permissions and
1414
~ limitations under the License.
1515
--%>
16+
<%@ page import="org.apache.taglibs.standard.functions.Functions" %>
1617
<%@ page
1718
import="org.wso2.carbon.event.publisher.stub.EventPublisherAdminServiceStub" %>
1819

@@ -363,7 +364,7 @@
363364
name="<%=eventPublisherPropertyDto[index].getKey()%>"
364365
id="<%=propertyId%><%=index%>" class="initE"
365366
style="width:75%"
366-
value="<%= eventPublisherPropertyDto[index].getValue() != null ? eventPublisherPropertyDto[index].getValue() : "" %>" disabled="disabled"/>
367+
value="<%= eventPublisherPropertyDto[index].getValue() != null ? Functions.escapeXml(eventPublisherPropertyDto[index].getValue()) : "" %>" disabled="disabled"/>
367368

368369
<% } %>
369370

@@ -443,7 +444,7 @@
443444
name="<%=eventPublisherPropertyDto[index].getKey()%>"
444445
id="<%=propertyId%><%=index%>" class="initE"
445446
style="width:75%"
446-
value="<%= eventPublisherPropertyDto[index].getValue() != null ? eventPublisherPropertyDto[index].getValue() : "" %>" disabled="disabled"/>
447+
value="<%= eventPublisherPropertyDto[index].getValue() != null ? Functions.escapeXml(eventPublisherPropertyDto[index].getValue()) : "" %>" disabled="disabled"/>
447448

448449
<% } %>
449450

components/event-receiver/org.wso2.carbon.event.receiver.ui/src/main/resources/web/eventreceiver/eventReceiver_details.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
~ See the License for the specific language governing permissions and
1414
~ limitations under the License.
1515
--%>
16+
<%@ page import="org.apache.taglibs.standard.functions.Functions" %>
1617
<%@ page
1718
import="org.wso2.carbon.event.receiver.stub.EventReceiverAdminServiceStub" %>
1819

@@ -324,7 +325,7 @@
324325
name="<%=eventReceiverPropertyDto[index].getKey()%>"
325326
id="<%=propertyId%><%=index%>" class="initE"
326327
style="width:75%"
327-
value="<%= eventReceiverPropertyDto[index].getValue() != null ? eventReceiverPropertyDto[index].getValue() : "" %>" disabled="disabled"/>
328+
value="<%= eventReceiverPropertyDto[index].getValue() != null ? Functions.escapeXml(eventReceiverPropertyDto[index].getValue()) : "" %>" disabled="disabled"/>
328329

329330
<% } %>
330331

0 commit comments

Comments
 (0)