Repository navigation
The server reads web addresses, and no longer reads its own files.
Added
- The server reads web addresses:
POST /processwith JSON
{"url": "https://…", "options": {…}}answers exactly what
att(url, **options)gives on a client — the page read with its own
address (links resolve,meta.sourceis the final address), any other
file by its type — behind the server's guards. One Artifact, as for an
upload; an address holding many files (a repository, a zip) is HTTP 400,
pointing to/unpack. The attachments.dev playground uses it.
Security
- The server no longer reads its own disk.
POST /unpackwith
{"url": …}accepted any inputatt()accepts, local paths included: a
caller could read the server's files (/etc/passwd,/proc/self/environ,
folders, wildcards). It now takeshttp(s)://addresses,github://,
and the prefixes the server itself registered (register_unpack_handler);
anything else is HTTP 400. A client whose own input fails to resolve no
longer has the server try it as a path of its own. - Server downloads are no bigger than an upload may be
(ATTACHMENTS_MAX_UPLOAD, 256 MB by default; 25 MB on the hosted tier),
refused from theContent-Lengthbefore reading when it says so. - Downloads now follow the server's per-request private-address guard
(private_url_guard) when not told otherwise, as the html processor's
browser already did.