Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix format string injection when using option --write-info-json for video with percent sign in title. (Caused TypeError "not enough arguments for format string") #32559

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

mk-pmb
Copy link
Contributor

@mk-pmb mk-pmb commented Sep 13, 2023

Before submitting a pull request make sure you have:

  • Searched the bugtracker for similar pull requests
  • Read adding new extractor tutorial
    • It is not a new extractor.
  • Read youtube-dl coding conventions and adjusted the code to meet them
    • I had no choice of style in this case.
  • Covered the code with tests (note that PRs without tests will be REJECTED)
    • Can't be helped then; I have no idea how to test for this.
  • Checked the code with flake8
    • All original 3760 complaints were preserved. No new ones have been added.

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?


Description of your pull request and other information

My change concatenates the filename verbatim to the output, instead of to the template that is fed into msg(). This way, percent signs in the filename will not trip up msg().

@mk-pmb mk-pmb force-pushed the fix-format-string-issue-32558 branch from 5e73db8 to b858f82 Compare December 4, 2023 18:13
@dirkf dirkf merged commit be008e6 into ytdl-org:master Dec 6, 2023
14 checks passed
@dirkf
Copy link
Contributor

dirkf commented Dec 6, 2023

Thanks!

@mk-pmb mk-pmb deleted the fix-format-string-issue-32558 branch January 10, 2024 23:41
@mk-pmb mk-pmb restored the fix-format-string-issue-32558 branch January 10, 2024 23:41
@mk-pmb mk-pmb deleted the fix-format-string-issue-32558 branch January 10, 2024 23:44
@mk-pmb mk-pmb restored the fix-format-string-issue-32558 branch January 10, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants