Skip to content

Commit febbcef

Browse files
committed
polishing
1 parent 6eb15bd commit febbcef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/imagesharp/security.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Security Considerations
22

3-
Image processing is a memory-intensive application. Most image processing libraries (including ImageSharp and SkiaSharp) decode images into in-memory buffers. Any publicly facing service using such a library might be vulnerable to DoS attacks without implementing further measures.
3+
Image processing is a memory-intensive application. Most image processing libraries (including ImageSharp, SkiaSharp and Magick.NET) decode images into in-memory buffers for further processing. Without additional measures, any publicly facing service that consumes images coming from untrusted sources might be vulnerable to DoS attacks attempting to deplate process memory.
44

5-
For solutions using ImageSharp such measures can be:
5+
Such measures can be:
66
- Authentication, for example by using HMAC. See [Securing Processing Commands in ImageSharp.Web](../imagesharp.web/processingcommands.md#securing-processing-commands).
77
- Offloading to separate services/containers.
88
- Placing the solution behind a reverse proxy.
@@ -12,7 +12,7 @@ For solutions using ImageSharp such measures can be:
1212
```csharp
1313
Configuration.Default.MemoryAllocator = MemoryAllocator.Create(new MemoryAllocatorOptions()
1414
{
15-
// Note that this limits the maximum image size to 64 megapixels.
15+
// Note that this limits the maximum image size to 64 megapixels of Rgba32.
1616
// Any attempt to create a larger image will throw.
1717
AllocationLimitMegabytes = 256
1818
});

0 commit comments

Comments
 (0)