Skip to content

README: details names the "option" only when exmpeg rejects an option - #112

Merged
rubas-agent[bot] merged 1 commit into
mainfrom
readme-filter-details
Dec 3, 2026
Merged

rubas-agent[bot] merged 1 commit into
mainfrom
readme-filter-details

Conversation

@rubas-agent

@rubas-agent rubas-agent Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Before

The README section "Untrusted input" says:

The call returns {:error, %Exmpeg.Error{reason: :invalid_request}}, and details names the filter and the option.

For a blocked filter, native/exmpeg_native/src/filter_io.rs adds only the filter:

if BLOCKED_FILTERS.contains(&filter.name.as_str()) {
    return Err(NativeError::new(
        "invalid_request",
        "video_filter uses a filter that reads or writes outside the filter graph",
    )
    .with_detail("filter", filter.name));
}

Problem

A caller who matches both "filter" and "option" in details, as the README says, misses every rejection of a whole filter, such as movie=clip.mp4 or frei0r.

After

The call returns {:error, %Exmpeg.Error{reason: :invalid_request}}, and details names the "filter". When exmpeg rejects only an option, details names the "option" too.

The 0.8.0 entry of CHANGELOG.md had the same sentence and now says the same.

Cause and design

filter_io.rs:check returns only "filter" for a name in BLOCKED_FILTERS, and "filter" with "option" for a file option in BLOCKED_OPTIONS. The sentence came with #105. I fixed the docs, not the error, because a blocked filter has no option to name. The change is docs only, so it has no test.

@rubas-agent
rubas-agent Bot merged commit 59528ed into main Dec 3, 2026
1 check passed
@rubas-agent
rubas-agent Bot deleted the readme-filter-details branch December 3, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant