Package org.apache.tika.parser.strings
Class StringsConfig.RuntimeConfig
java.lang.Object
org.apache.tika.parser.strings.StringsConfig
org.apache.tika.parser.strings.StringsConfig.RuntimeConfig
- All Implemented Interfaces:
Serializable
- Enclosing class:
- StringsConfig
RuntimeConfig blocks modification of security-sensitive path fields at runtime.
When a config is obtained from ParseContext (i.e. user-provided at parse time),
it should be deserialized as a RuntimeConfig to prevent path injection.
This class is deserialized by ConfigDeserializer (in tika-serialization) which uses Jackson to populate fields via setters. If the JSON contains any path fields, the overridden setters will throw TikaConfigException.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.tika.parser.strings.StringsConfig
StringsConfig.RuntimeConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetFilePath(String filePath) Sets the path to the "file" command.voidsetStringsPath(String stringsPath) Sets the "strings" installation folder.Methods inherited from class org.apache.tika.parser.strings.StringsConfig
getEncoding, getFilePath, getMinLength, getStringsPath, getTimeoutSeconds, setEncoding, setMinLength, setTimeoutSeconds
-
Constructor Details
-
RuntimeConfig
public RuntimeConfig()
-
-
Method Details
-
setStringsPath
Description copied from class:StringsConfigSets the "strings" installation folder.- Overrides:
setStringsPathin classStringsConfig- Parameters:
stringsPath- the "strings" installation folder.- Throws:
TikaConfigException
-
setFilePath
Description copied from class:StringsConfigSets the path to the "file" command.- Overrides:
setFilePathin classStringsConfig- Parameters:
filePath- the path to the "file" command.- Throws:
TikaConfigException
-