Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.UncheckedIOException;
Expand Down Expand Up @@ -152,6 +151,8 @@ public AcToolUiService(Configuration config) {
* @throws ServletException
* @throws IOException
*/
@SuppressWarnings(/* SonarCloud false positive */ {
"javasecurity:S2083" /* resource path is not a filesystem path, https://community.sonarsource.com/t/false-positive-with-javasecurity-s2083-when-used-with-user-controlled-classloader-resource-names/187051 */})
protected void doGet(HttpServletRequest req, HttpServletResponse resp, String basePath, boolean isTouchUi)
throws ServletException, IOException {

Expand Down Expand Up @@ -186,7 +187,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp, String ba

// The following method is copied and slightly adjusted from from https://github.com/apache/felix-dev/blob/5d878f37b89ceef59920644d5e427f493b904030/webconsole/src/main/java/org/apache/felix/webconsole/servlet/AbstractServlet.java#L71

/**
/**
* If the request addresses a resource , this method serves it
* and returns <code>true</code>. Otherwise <code>false</code> is returned.
* <p>
Expand Down Expand Up @@ -242,14 +243,7 @@ protected final boolean spoolResource(final HttpServletRequest request, String r
response.setContentLength( connection.getContentLength() );
}
response.setStatus( HttpServletResponse.SC_OK);

// spool the actual contents
final OutputStream out = response.getOutputStream();
final byte[] buf = new byte[2048];
int rd;
while ( ( rd = ins.read( buf ) ) >= 0 ) {
out.write( buf, 0, rd );
}
ins.transferTo(response.getOutputStream());
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/*
* (C) Copyright 2019 Netcentric, A Cognizant Digital Business.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*/
package biz.netcentric.cq.tools.actool.ui;

/*-
Expand Down
Loading