From 1b69d87f0d207ae60f7d0d4245b1aac519c73a87 Mon Sep 17 00:00:00 2001 From: skelmis Date: Mon, 19 Feb 2024 18:56:42 +1300 Subject: [PATCH 1/2] doc: add clarification to executable param --- disnake/player.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/disnake/player.py b/disnake/player.py index 3ff094d4d6..45c666f7f7 100644 --- a/disnake/player.py +++ b/disnake/player.py @@ -126,6 +126,12 @@ class FFmpegAudio(AudioSource): :class:`FFmpegOpusAudio` work should subclass this. .. versionadded:: 1.3 + + .. danger:: + + As this wraps a subprocess call, ensure that + arguments such as ``executable`` are not + set from direct user input. """ def __init__( @@ -240,6 +246,11 @@ class FFmpegPCMAudio(FFmpegAudio): passed to the stdin of ffmpeg. executable: :class:`str` The executable name (and path) to use. Defaults to ``ffmpeg``. + + .. danger:: + + As this wraps a subprocess call, ensure that + this argument is not set from direct user input. pipe: :class:`bool` If ``True``, denotes that ``source`` parameter will be passed to the stdin of ffmpeg. Defaults to ``False``. @@ -342,6 +353,11 @@ class FFmpegOpusAudio(FFmpegAudio): executable: :class:`str` The executable name (and path) to use. Defaults to ``ffmpeg``. + + .. danger:: + + As this wraps a subprocess call, ensure that + this argument is not set from direct user input. pipe: :class:`bool` If ``True``, denotes that ``source`` parameter will be passed to the stdin of ffmpeg. Defaults to ``False``. From a6078371a22e09b743314afede811df31a026f02 Mon Sep 17 00:00:00 2001 From: skelmis Date: Mon, 19 Feb 2024 19:06:02 +1300 Subject: [PATCH 2/2] chore: add changelog --- changelog/1158.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/1158.doc.rst diff --git a/changelog/1158.doc.rst b/changelog/1158.doc.rst new file mode 100644 index 0000000000..3a79ab60be --- /dev/null +++ b/changelog/1158.doc.rst @@ -0,0 +1 @@ +Adding some clarifying documentation around the executable parameters of audio classes based off of internal discussions.