Skip to content

Commit

Permalink
NMS-15504: Prevent angular expr eval without app
Browse files Browse the repository at this point in the history
Do not spawn a default app when there is no real app end prevent
evaluation of angular expressions if no app is defined.
  • Loading branch information
fooker committed Jul 19, 2023
1 parent 5a3b0b6 commit 0ae6a9b
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</div>

<!-- Daily Options -->
<div class="mt-2" ng-if="options.type === 'daily' || options.type === 'daysPerWeek'">
<div class="mt-2" ng-if="options.type === 'daily' || options.type === 'daysPerWeek'" ng-app="onms.default.apps">
<div class="form-group">
<label>Interval</label>
<onms-schedule-interval ng-model="options.interval"></onms-schedule-interval>
Expand Down Expand Up @@ -96,7 +96,7 @@
</div>

<!-- Days per Month -->
<div class="" ng-if="options.type === 'daysPerMonth'">
<div class="" ng-if="options.type === 'daysPerMonth'" ng-app="onms.default.apps">
<!-- Other options -->
<div class="form-group">
<label>At</label>
Expand Down
4 changes: 3 additions & 1 deletion opennms-webapp/src/main/webapp/WEB-INF/templates/navbar.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
</ul>
</#if>

<onms-central-search></onms-central-search>
<div ng-app="onms.default.apps">
<onms-central-search></onms-central-search>
</div>

<ul class="navbar-nav ml-auto">
<#if request.remoteUser?has_content >
Expand Down
2 changes: 1 addition & 1 deletion opennms-webapp/src/main/webapp/admin/snmpInterfaces.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<strong>Node Label</strong>: <%=nodeLabel%><br/>
</p>
<p>
<div id="onms-interfaces-config">
<div id="onms-interfaces-config" ng-app="onms.default.apps">
<div growl></div>
<onms-interfaces-config node="<%=nodeId%>"/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion opennms-webapp/src/main/webapp/element/node.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ function confirmAssetEdit() {
</jsp:include>
</c:if>

<div id="onms-interfaces" class="card">
<div id="onms-interfaces" class="card" ng-app="onms.default.apps">
<div class="card-header">
<span>Node Interfaces</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion opennms-webapp/src/main/webapp/includes/bootstrap.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
ng-app="${param.ngapp}"
</c:when>
<c:otherwise>
ng-app="onms.default.apps"
ng-non-bindable
</c:otherwise>
</c:choose>
<c:if test="${param.scrollSpy != null}">
Expand Down
2 changes: 1 addition & 1 deletion opennms-webapp/src/main/webapp/includes/search-box.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
session="true"
%>

<div id="onms-search">
<div id="onms-search" ngapp="onms.default.apps">

<div class="card">
<div class="card-header">
Expand Down
1 change: 1 addition & 0 deletions opennms-webapp/src/main/webapp/locations/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<jsp:param name="headTitle" value="Monitoring Locations" />
<jsp:param name="breadcrumb" value="<a href='admin/index.jsp'>Admin</a>" />
<jsp:param name="breadcrumb" value="Monitoring Locations" />
<jsp:param name="ngapp" value="onms.default.apps" />
</jsp:include>

<jsp:include page="/assets/load-assets.jsp" flush="false">
Expand Down
1 change: 1 addition & 0 deletions opennms-webapp/src/main/webapp/minion/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<jsp:param name="headTitle" value="Manage Minions" />
<jsp:param name="breadcrumb" value="<a href='admin/index.jsp'>Admin</a>" />
<jsp:param name="breadcrumb" value="Manage Minions" />
<jsp:param name="ngapp" value="onms.default.apps" />
</jsp:include>

<jsp:include page="/assets/load-assets.jsp" flush="false">
Expand Down
1 change: 1 addition & 0 deletions opennms-webapp/src/main/webapp/report/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<jsp:param name="headTitle" value="Reports" />
<jsp:param name="location" value="report" />
<jsp:param name="breadcrumb" value="Reports" />
<jsp:param name="ngapp" value="onms.default.apps" />
</jsp:include>

<div class="row">
Expand Down
1 change: 1 addition & 0 deletions opennms-webapp/src/main/webapp/status/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<jsp:param name="title" value="<%= title %>" />
<jsp:param name="headTitle" value="<%= title %>" />
<jsp:param name="breadcrumb" value="<%= title %>" />
<jsp:param name="ngapp" value="onms.default.apps" />
</jsp:include>

<jsp:include page="/assets/load-assets.jsp" flush="false">
Expand Down

0 comments on commit 0ae6a9b

Please sign in to comment.