fix: disable api endpoint for ffmpeg path for security (#11225)

Co-authored-by: Niels van Velzen <nielsvanvelzen@users.noreply.github.com>
This commit is contained in:
gnattu 2024-03-29 03:57:55 +08:00 committed by GitHub
parent 16e72d6883
commit b496ebc175
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,12 +125,15 @@ public class ConfigurationController : BaseJellyfinApiController
/// <param name="mediaEncoderPath">Media encoder path form body.</param> /// <param name="mediaEncoderPath">Media encoder path form body.</param>
/// <response code="204">Media encoder path updated.</response> /// <response code="204">Media encoder path updated.</response>
/// <returns>Status.</returns> /// <returns>Status.</returns>
[Obsolete("This endpoint is obsolete.")]
[ApiExplorerSettings(IgnoreApi = true)]
[HttpPost("MediaEncoder/Path")] [HttpPost("MediaEncoder/Path")]
[Authorize(Policy = Policies.FirstTimeSetupOrElevated)] [Authorize(Policy = Policies.FirstTimeSetupOrElevated)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult UpdateMediaEncoderPath([FromBody, Required] MediaEncoderPathDto mediaEncoderPath) public ActionResult UpdateMediaEncoderPath([FromBody, Required] MediaEncoderPathDto mediaEncoderPath)
{ {
_mediaEncoder.UpdateEncoderPath(mediaEncoderPath.Path, mediaEncoderPath.PathType); // API ENDPOINT DISABLED (NOOP) FOR SECURITY PURPOSES
// _mediaEncoder.UpdateEncoderPath(mediaEncoderPath.Path, mediaEncoderPath.PathType);
return NoContent(); return NoContent();
} }
} }