samvera-labs / active_encode

Declare encode job classes that can be run by a variety of encoding services
Other
6 stars 8 forks source link

Convert HTTP strings to URI before processing #137

Closed masaball closed 2 weeks ago

masaball commented 3 weeks ago

sanitized_filename = ActiveEncode.sanitize_base input_url is used when creating the file path for output files. If input_url contains a long query string such as is seen with Sharepoint download urls, the path cannot be created and the encode will fail. This may be due to file path length restrictions or possibly disallowed sequences of characters?

The sanitize_base method has handling for HTTP URIs that strips the query string, so we can convert strings starting with 'http' or 'https' to the URI class and rely on the handling already present in the sanitizer.