muse-dev[bot] commented on a change in pull request #139:
URL: https://github.com/apache/solr/pull/139#discussion_r636708465
##########
File path: solr/core/src/java/org/apache/solr/security/JWTAuthPlugin.java
##########
@@ -155,8 +168,33 @@ public void init(Map<String, Object> pluginConfig) {
requiredScopes = Arrays.asList(requiredScopesStr.split("\\s+"));
}
+ // Parse custom IDP SSL Cert from either path or string
+ InputStream trustedCertsStream = null;
+ String trustedCertsFile = (String)
pluginConfig.get(PARAM_TRUSTED_CERTS_FILE);
+ String trustedCerts = (String) pluginConfig.get(PARAM_TRUSTED_CERTS);
+ if (trustedCertsFile != null && trustedCerts != null) {
+ throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Found
both " + PARAM_TRUSTED_CERTS_FILE + " and " + PARAM_TRUSTED_CERTS + ", please
use only one");
+ }
+ if (trustedCertsFile != null) {
+ try {
+ trustedCertsStream =
Files.newInputStream(Paths.get(trustedCertsFile));
Review comment:
*PATH_TRAVERSAL_IN:* This API
(java/nio/file/Paths.get(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;)
reads a file whose location might be specified by user input
[(details)](https://find-sec-bugs.github.io/bugs.htm#PATH_TRAVERSAL_IN)
(at-me [in a reply](https://docs.muse.dev/docs/talk-to-muse/) with `help` or
`ignore`)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]