Repository navigation
Ridu v0.21.0
Ridu 0.21.0
Image uploads take photos from current phones: Ridu reserves the memory image processing actually
uses, so 24- and 40-megapixel photos are no longer refused. MaxImageDimension stores a smaller
original, and remote image imports refuse IPv4-compatible IPv6 addresses.
Security
- Importing an image with
uploadFromURLrefused private and special-use addresses, but accepted
IPv4-compatible IPv6 addresses such as::127.0.0.1and::169.254.169.254, which reach the
same hosts. Remote fetches now accept IPv6 only inside the global unicast block,2000::/3,
without its special-purpose ranges.
Changes
UploadConfig.MaxImageDimensionscales a JPEG or PNG original wider or taller than that many
pixels down to fit before Ridu stores it, keeping its shape and never enlarging it. The scaled
image replaces the stored file with itswidth,height, andfilesize, the private source
that crops start from, and the image sizes made from it. It is stored upright, without the
camera's EXIF metadata. GIFs and smaller images keep their uploaded bytes. The value must be at
least the width and height of every image size. See
Limit large images.
Fixes
- Ridu reserved about twice the memory resizing an image used, so a photo over about 21
megapixels needed more than the whole 512 MiB budget and was refused. The reservation now
follows the work: for a JPEG, its chroma sampling, progressive coding and EXIF orientation. Image
sizes are resampled through an intermediate of four bytes a pixel instead of 32. With sizes of
800 and 1,600 pixels, a 24.5-megapixel photo reserves about 205 MiB instead of about 600 MB, and
photos up to the 40-megapixel limit are accepted. - The image budget is half of
GOMEMLIMITwhen you set it, and 512 MiB otherwise. - An image over the budget fails with a message that tells the person uploading the most the
server takes, ending, for example,upload an image of at most about 18.3 megapixels. An image
over the 20,000-pixel or 40-megapixel limit says which.
Upgrade
Update the Go module and all Ridu npm packages to 0.21.0 together, and rebuild the admin and
application binary. No contract changes.
Generated image sizes are resampled by a different library, so their pixels can differ slightly
from earlier versions'; their dimensions and crops are unchanged. Set GOMEMLIMIT a little below
your service's memory, for example GOMEMLIMIT=900MiB for 1 GB.
Ridu requires Go 1.26.9 or newer. Go 1.27.0 and 1.27.1 meet that minimum but still have the
standard-library vulnerabilities described in the 0.20.0 notes, so build and deploy with Go 1.26.9
or a later 1.26 release, or with Go 1.27.2 or later.