mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-22 04:55:10 +00:00
Replace URL with SURL to securely access URLs
This commit is contained in:
parent
d92242ec35
commit
0972786515
@ -49,6 +49,7 @@ import net.sourceforge.plantuml.regex.RegexConcat;
|
|||||||
import net.sourceforge.plantuml.regex.RegexLeaf;
|
import net.sourceforge.plantuml.regex.RegexLeaf;
|
||||||
import net.sourceforge.plantuml.regex.RegexResult;
|
import net.sourceforge.plantuml.regex.RegexResult;
|
||||||
import net.sourceforge.plantuml.security.SFile;
|
import net.sourceforge.plantuml.security.SFile;
|
||||||
|
import net.sourceforge.plantuml.security.SURL;
|
||||||
import net.sourceforge.plantuml.style.parser.StyleParser;
|
import net.sourceforge.plantuml.style.parser.StyleParser;
|
||||||
import net.sourceforge.plantuml.style.parser.StyleParsingException;
|
import net.sourceforge.plantuml.style.parser.StyleParsingException;
|
||||||
import net.sourceforge.plantuml.utils.BlocLines;
|
import net.sourceforge.plantuml.utils.BlocLines;
|
||||||
@ -84,7 +85,7 @@ public class CommandStyleImport extends SingleLineCommand2<TitledDiagram> {
|
|||||||
try {
|
try {
|
||||||
BlocLines lines = null;
|
BlocLines lines = null;
|
||||||
if (path.startsWith("http")) {
|
if (path.startsWith("http")) {
|
||||||
URL url = new URL(path);
|
SURL url = SURL.create (path);
|
||||||
try (InputStream remoteInputStream = url.openStream()) {
|
try (InputStream remoteInputStream = url.openStream()) {
|
||||||
lines = BlocLines.load(remoteInputStream, location);
|
lines = BlocLines.load(remoteInputStream, location);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user