Skip to content

Commit 29438a4

Browse files
committed
Merge branch 'hotfix/3.2.4'
2 parents d087041 + 1468235 commit 29438a4

10 files changed

Lines changed: 50 additions & 33 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Open Source Enterprise Deployment for Data Science Apps
1616

1717
Learn more at <https://shinyproxy.io>
1818

19-
**(c) Copyright Open Analytics NV, 2016-2025 - Apache License 2.0**
19+
**(c) Copyright Open Analytics NV, 2016-2026 - Apache License 2.0**
2020

2121
## Docs
2222

owasp-suppression.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,10 @@
138138
<!-- Disputed by developers, not relevant for ShinyProxy -->
139139
<cve>CVE-2023-35116</cve>
140140
</suppress>
141+
142+
<!-- Fixed in kotlin-stdlib 1.4.21, ShinyProxy uses a newer version-->
143+
<suppress>
144+
<cve>CVE-2020-29582</cve>
145+
</suppress>
146+
141147
</suppressions>

pom.xml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>eu.openanalytics</groupId>
77
<artifactId>shinyproxy</artifactId>
8-
<version>3.2.3</version>
8+
<version>3.2.4</version>
99
<packaging>jar</packaging>
1010
<inceptionYear>2016</inceptionYear>
1111

@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.springframework.boot</groupId>
2222
<artifactId>spring-boot-starter-parent</artifactId>
23-
<version>3.4.13</version>
23+
<version>3.5.14</version>
2424
<relativePath/>
2525
</parent>
2626

@@ -31,12 +31,12 @@
3131
<maven.compiler.target>21</maven.compiler.target>
3232
<resource.delimiter>&amp;</resource.delimiter>
3333
<!-- Dependency versions -->
34-
<containerproxy.version>1.2.3</containerproxy.version>
35-
<spring-boot.version>3.4.13</spring-boot.version>
34+
<containerproxy.version>1.2.4</containerproxy.version>
35+
<spring-boot.version>3.5.14</spring-boot.version>
3636
<datatables.version>1.13.5</datatables.version>
3737
<datatables-buttons.version>2.4.1</datatables-buttons.version>
3838
<datatables-responsive.version>2.2.7</datatables-responsive.version>
39-
<handlebars.version>4.7.7</handlebars.version>
39+
<handlebars.version>4.7.9</handlebars.version>
4040
<sqlite-jdbc.version>3.50.3.0</sqlite-jdbc.version>
4141
<commons-lang.version>3.18.0</commons-lang.version>
4242
<!-- Plugin versions -->
@@ -116,7 +116,7 @@
116116
<version>${datatables-responsive.version}</version>
117117
</dependency>
118118
<dependency>
119-
<groupId>org.webjars</groupId>
119+
<groupId>org.webjars.npm</groupId>
120120
<artifactId>handlebars</artifactId>
121121
<version>${handlebars.version}</version>
122122
</dependency>
@@ -158,24 +158,14 @@
158158

159159
<!-- Transitive dependencies updated for security -->
160160
<dependency>
161-
<groupId>io.undertow</groupId>
162-
<artifactId>undertow-core</artifactId>
163-
<version>2.3.21.Final</version>
164-
</dependency>
165-
<dependency>
166-
<groupId>io.undertow</groupId>
167-
<artifactId>undertow-servlet</artifactId>
168-
<version>2.3.21.Final</version>
169-
</dependency>
170-
<dependency>
171-
<groupId>io.undertow</groupId>
172-
<artifactId>undertow-websockets-jsr</artifactId>
173-
<version>2.3.21.Final</version>
161+
<groupId>org.webjars</groupId>
162+
<artifactId>swagger-ui</artifactId>
163+
<version>5.32.5</version>
174164
</dependency>
175165
<dependency>
176166
<groupId>org.apache.logging.log4j</groupId>
177167
<artifactId>log4j-api</artifactId>
178-
<version>2.25.3</version>
168+
<version>2.25.4</version>
179169
</dependency>
180170
</dependencies>
181171

src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import eu.openanalytics.containerproxy.model.runtime.runtimevalues.PortMappingsKey;
3737
import eu.openanalytics.containerproxy.model.runtime.runtimevalues.PublicPathKey;
3838
import eu.openanalytics.containerproxy.model.runtime.runtimevalues.RuntimeValue;
39+
import eu.openanalytics.containerproxy.model.spec.ParameterDefinition;
3940
import eu.openanalytics.containerproxy.model.spec.ProxySpec;
4041
import eu.openanalytics.containerproxy.service.AsyncProxyService;
4142
import eu.openanalytics.containerproxy.service.InvalidParametersException;
@@ -80,6 +81,7 @@
8081
import javax.annotation.PostConstruct;
8182
import javax.inject.Inject;
8283
import java.io.IOException;
84+
import java.util.HashMap;
8385
import java.util.List;
8486
import java.util.Map;
8587
import java.util.Optional;
@@ -169,6 +171,11 @@ private ModelAndView app(ModelMap map, HttpServletRequest request, String appNam
169171
map.put("parameterValues", allowedParametersForUser.getValues());
170172
map.put("parameterDefaults", allowedParametersForUser.getDefaultValue());
171173
map.put("parameterDefinitions", spec.getParameters().getDefinitions());
174+
Map<ParameterDefinition, String> cleanedAppParameterDescriptions = new HashMap<>();
175+
for (ParameterDefinition parameterDefinition : spec.getParameters().getDefinitions()) {
176+
cleanedAppParameterDescriptions.put(parameterDefinition, thymeleaf.cleanHtml(parameterDefinition.getDescription()));
177+
}
178+
map.put("cleanedAppParameterDescriptions", cleanedAppParameterDescriptions);
172179
map.put("parameterIds", spec.getParameters().getIds());
173180

174181
if (spec.getParameters().getTemplate() != null) {

src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public abstract class BaseController {
114114
@Inject
115115
private IContainerBackend backend;
116116
@Inject
117-
private Thymeleaf thymeleaf;
117+
protected Thymeleaf thymeleaf;
118118
@Inject
119119
protected SpecExpressionResolver expressionResolver;
120120

@@ -170,7 +170,7 @@ protected void prepareMap(ModelMap map, HttpServletRequest request, ProxySpec pr
170170
map.put("bootstrapCss", "/css/bootstrap.css");
171171
map.put("bootstrapJs", "/js/bootstrap.js");
172172
map.put("jqueryJs", "/webjars/jquery/3.7.1/jquery.min.js");
173-
map.put("handlebars", "/webjars/handlebars/4.7.7/handlebars.runtime.min.js");
173+
map.put("handlebars", "/webjars/handlebars/4.7.9/dist/handlebars.runtime.min.js");
174174

175175
boolean isLoggedIn = authentication != null && !(authentication instanceof AnonymousAuthenticationToken) && authentication.isAuthenticated();
176176
map.put("isLoggedIn", isLoggedIn);
@@ -185,7 +185,7 @@ protected void prepareMap(ModelMap map, HttpServletRequest request, ProxySpec pr
185185
map.put("pauseSupported", backend.supportsPause());
186186
map.put("spInstance", identifierService.instanceId);
187187
map.put("allowTransferApp", allowTransferApp);
188-
map.put("notificationMessage", environment.getProperty("proxy.notification-message"));
188+
map.put("notificationMessage", thymeleaf.cleanHtml(environment.getProperty("proxy.notification-message")));
189189
map.put("bodyClasses", bodyClasses);
190190

191191
List<ProxySpec> apps = proxyService.getUserSpecs();

src/main/java/eu/openanalytics/shinyproxy/controllers/IndexController.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131

3232
import javax.annotation.PostConstruct;
3333
import javax.inject.Inject;
34+
import java.util.HashMap;
3435
import java.util.List;
36+
import java.util.Map;
3537

3638
@Controller
3739
public class IndexController extends BaseController {
@@ -95,6 +97,18 @@ private Object index(ModelMap map, HttpServletRequest request) {
9597

9698
prepareMap(map, request);
9799

100+
Map<ProxySpec, Boolean> openSwitchInstanceInsteadOfApp = new HashMap<>();
101+
Map<ProxySpec, String> appUrl = new HashMap<>();
102+
Map<ProxySpec, String> cleanDescription = new HashMap<>();
103+
for (ProxySpec app : apps) {
104+
openSwitchInstanceInsteadOfApp.put(app, thymeleaf.openSwitchInstanceInsteadOfApp(app));
105+
appUrl.put(app, thymeleaf.getAppUrl(app));
106+
cleanDescription.put(app, thymeleaf.cleanHtml(app.getDescription()));
107+
}
108+
map.put("openSwitchInstanceInsteadOfApp", openSwitchInstanceInsteadOfApp);
109+
map.put("appUrl", appUrl);
110+
map.put("cleanDescription", cleanDescription);
111+
98112
// navbar
99113
map.put("page", "index");
100114

src/main/resources/static/handlebars/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ set -u
2626
set -o pipefail
2727

2828
if [ ! -f "./node_modules/.bin/handlebars" ]; then
29-
npm install handlebars@4.7.7 --save false
29+
npm install handlebars@4.7.9 --save false
3030
fi
3131

3232
rm precompiled.js

src/main/resources/static/handlebars/precompiled.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/templates/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h2>Choose the parameters for this app</h2>
154154
th:text="${value}"></option>
155155
</select>
156156
<span class="help-block" th:if="${parameterDefinition.getDescription() != null}"
157-
th:utext="${@thymeleaf.cleanHtml(parameterDefinition.getDescription())}"></span>
157+
th:utext="${cleanedAppParameterDescriptions.get(parameterDefinition)}"></span>
158158
</div>
159159
</div>
160160

src/main/resources/templates/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@
5151
<th:block th:if="${app != null}">
5252
<div
5353
class="list-group-item"
54-
th:classappend="${@thymeleaf.openSwitchInstanceInsteadOfApp(app) ? 'app-link-switch' : 'app-link-open'}"
54+
th:classappend="${openSwitchInstanceInsteadOfApp.get(app) ? 'app-link-switch' : 'app-link-open'}"
5555
th:data-app-id="${app.id}"
56-
th:data-app-url="${@thymeleaf.openSwitchInstanceInsteadOfApp(app) ? '' : @thymeleaf.getAppUrl(app)}"
56+
th:data-app-url="${openSwitchInstanceInsteadOfApp.get(app) ? '#' : appUrl.get(app)}"
5757
>
58-
<a th:href="${@thymeleaf.openSwitchInstanceInsteadOfApp(app) ? '#' : @thymeleaf.getAppUrl(app)}"
59-
th:remove="${@thymeleaf.openSwitchInstanceInsteadOfApp(app)} ? tag : none">
58+
<a th:href="${openSwitchInstanceInsteadOfApp.get(app) ? '#' : appUrl.get(app)}"
59+
th:remove="${openSwitchInstanceInsteadOfApp.get(app)} ? tag : none">
6060
<span class="app-list-title app-list-title-before" th:text="${app.displayName == null} ? ${app.id} : ${app.displayName}"></span>
6161
<th:block th:if="${appLogos.get(app) != null}" th:with="logo=${appLogos.get(app)}">
6262
<img th:height="${logo.height}" th:src="${logo.src}" th:style="${logo.style}" th:width="${logo.width}">
6363
</th:block>
6464
<span class="app-list-title app-list-title-after" th:text="${app.displayName == null} ? ${app.id} : ${app.displayName}"></span>
6565
</a>
66-
<span class="app-list-description" th:if="${app.description != null}" th:utext="${@thymeleaf.cleanHtml(app.description)}"></span>
66+
<span class="app-list-description" th:if="${app.description != null}" th:utext="${cleanDescription.get(app)}"></span>
6767
</div>
6868
</th:block>
6969
</th:block>
@@ -75,7 +75,7 @@
7575
th:class="${myAppsMode == 'Inline' ? 'col-xs-12 col-md-4 col-md-offset-3 col-lg-5 col-lg-offset-3' : 'col-lg-6 col-lg-offset-3'}">
7676
<div class="alert alert-warning notification-message" role="alert" th:if="${notificationMessage != null}">
7777
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
78-
<p th:utext="${@thymeleaf.cleanHtml(notificationMessage)}"> </p>
78+
<p th:utext="${notificationMessage}"> </p>
7979
</div>
8080
<div class="alert alert-info" role="alert"
8181
th:if="${groupedApps.isEmpty() && ungroupedApps.isEmpty()}">

0 commit comments

Comments
 (0)