mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-28 15:56:31 +00:00
fix: only allow to read some environment variables
This commit is contained in:
parent
fbe7fa3b25
commit
ff6e71e626
@ -165,13 +165,17 @@ public enum SecurityProfile {
|
|||||||
if (name == null)
|
if (name == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (this == UNSECURE)
|
final String lname = name.toLowerCase();
|
||||||
|
if (lname.startsWith("plantuml.security"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (lname.startsWith("plantuml"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (name.toLowerCase().startsWith("plantuml"))
|
if (lname.equals("path.separator") || lname.equals("line.separator"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return true;
|
return this == UNSECURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,6 @@ class GetenvTest {
|
|||||||
*/
|
*/
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@ValueSource(strings = {
|
@ValueSource(strings = {
|
||||||
"java.version",
|
|
||||||
"path.separator",
|
"path.separator",
|
||||||
"line.separator",
|
"line.separator",
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user