Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISPN-9679 Move property replacement to the XMLStreamReader
- Loading branch information
1 parent
1013af6
commit 8ae81f8
Showing
25 changed files
with
207 additions
and
179 deletions.
There are no files selected for viewing
95 changes: 47 additions & 48 deletions
95
core/src/main/java/org/infinispan/configuration/parsing/Parser.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/infinispan/configuration/parsing/SecurityActions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.infinispan.configuration.parsing; | ||
|
||
import java.security.AccessController; | ||
import java.security.PrivilegedAction; | ||
import java.util.Properties; | ||
|
||
import org.infinispan.security.Security; | ||
|
||
/** | ||
* SecurityActions for the org.infinispan.configuration.parsing | ||
* | ||
* Do not move. Do not change class and method visibility to avoid being called from other | ||
* {@link java.security.CodeSource}s, thus granting privilege escalation to external code. | ||
* | ||
* @author Tristan Tarrant | ||
* @since 10.0 | ||
*/ | ||
final class SecurityActions { | ||
private static <T> T doPrivileged(PrivilegedAction<T> action) { | ||
if (System.getSecurityManager() != null) { | ||
return AccessController.doPrivileged(action); | ||
} else { | ||
return Security.doPrivileged(action); | ||
} | ||
} | ||
|
||
static Properties getSystemProperties() { | ||
return doPrivileged(() -> System.getProperties()); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.