Class: ActiveStorage::HotCell::Server::ToolOperation

Inherits:
Operation
  • Object
show all
Defined in:
lib/active_storage/hot_cell/server/tool_operation.rb

Overview

Everything that hands the untrusted bytes to an exec'd tool rather than parsing them here.

A malicious input executes inside a child that dies at the end of the conversion, and this worker only copies bytes, spawns, and reads an exit status. That is worth knowing when reading these operations, and it is worth being careful about when changing them: reading a tool's output with an in-process library — to put dimensions in the result, say — or parsing its stdout brings bytes a hostile input produced back into this worker. Neither happens here.

Defined Under Namespace

Classes: UnreadableDocument

Constant Summary

Constants inherited from Operation

Operation::CONTENT_TYPES