You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Images::Image.open takes a path where MiniMagick takes a path OR a URL, and implementing it is an outbound-fetch surface #957
Image.open takes a path; MiniMagick's takes a path or a URL
Found while settling #950's Images half by reading the reference. go-ruby-images' README calls itself "a MiniMagick / ruby-vips replacement", and MiniMagick's lib/mini_magick/image.rb is:
so Images::Image.open("https://example.org/photo.png") raises Images::Error on a file that is not there, where MiniMagick fetches it.
⛔ This is filed, not fixed, because implementing it is a security decision
Making it work means the interpreter performs an outbound HTTP/FTP request driven by an argument that looks like a path. Any program that passes a user-supplied string to Image.open — which reads as a filesystem operation — would acquire a request-forgery surface it did not ask for. MiniMagick has that property; whether rbgo should inherit it is a judgement for the maintainer, not a parity checkbox.
Three options, no recommendation:
Implement it, matching MiniMagick, and document the fetch. The scheme set would be https?|ftp to match; ftp in particular is worth questioning on its own.
Refuse it loudly — detect the \A(https?|ftp):// shape and raise with a message saying rbgo's Image.open is filesystem-only, so the divergence is named at the call site instead of surfacing as a confusing "no such file".
Leave it and record the divergence in the README's table.
Option 2 is the only one that costs nothing and removes the confusing failure, but it is still a behaviour change and still the maintainer's call.
The ext argument: MiniMagick takes ext = nil and rbgo ignores a second argument (imagesArity is a minimum, so it is silently accepted rather than refused). Cosmetic: go-ruby-images' Open calls image.Decode, which sniffs the format from the content through the registered PNG/JPEG/GIF/BMP/TIFF/WebP decoders, so the hint changes nothing on either side. Noted here so the next reader does not re-derive it; not worth its own issue.
**options: forwarded to Pathname#open/URI#open in MiniMagick. Out of scope until someone wants a specific one.
Refs #950 — settled by its own PR; this is the separate divergence that reading the same reference turned up.
Prior art: priorart "Images::Image.open does not accept an http or ftp URL where MiniMagick fetches it" at 2026-11-17 13:37 CET reported prior art; checked: The 680 hits are keyword matches on images/open/accept/http across the tracker: #950 is the block-form question this PR settles, #931/#932/#935/#916 are the socket doors and the network hangs, #951/#952 the door ratchet and Augeas, #867/#497 Renovate. None is about Image.open's ARGUMENT accepting a URL. Nothing covers this.
Activity
vm(images): Image.open takes no block, and wiring one would call a fi…