dschmidt opened a new pull request, #3107: URL: https://github.com/apache/tika/pull/3107
Fixes https://issues.apache.org/jira/browse/TIKA-4864 In the docker image (and any unpacked distribution) TikaServerProcess is loaded from lib/tika-server-core-4.0.0.jar, so the code-source probe looks for lib/plugins, which does not exist. The fallback then returns the relative literal "plugins", which the forked PipesServer resolves against its own working directory. As soon as an orchestrator starts the container with a different workdir (docker run -w, CI systems like Woodpecker do this for service containers), the plugin registry comes up empty and every parse fails with "Unknown fetcher type: 'file-system-fetcher' ... Available types: []". The fix keeps the code-source heuristic but also probes the parent of the jar directory (covers the lib/ layout) and always returns an absolute path, so parent and forked process agree on the same directory regardless of CWD. Note: the CWD fallback is an untrusted-search-path pattern (CWE-427 class): the server loads and instantiates jars from whatever directory it happens to be started in. This change narrows the exposure by preferring the install directory and absolutizing, but keeps the fallback since it is documented behavior. An explicit override (CLI flag or env var) might be a good follow-up. Adds unit tests for all three probe locations plus the absolute-path guarantee. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
