Urgent.News

What's breaking now, across thousands of outlets.

Tech

Attachments you should refuse before they reach the parser

Accepting any attachment is a decision to run a parser on bytes a stranger chose. The cheap defences are at the boundary: extension and content-type allowlists, size caps, and a hard limit on the number of parts. Trust the decoded bytes, not the header The Content-Type header is a claim. Check the magic bytes after decoding: a file named invoice.pdf that starts with PK is a zip, and a file named…

Attachments that should be refused before they reach the parser are crucial to maintaining system security. Running a parser on bytes from an unknown source poses risks, so it is essential to implement cheap defenses at the boundary. Extension and content-type allowlists, size caps, and a hard limit on the number of parts are effective initial safeguards.

However, trust the decoded bytes, not the header, as the Content-Type header is simply a claim. After decoding, check the magic bytes to verify the file type. For example, a file named invoice.pdf starting with PK is likely a zip, and a file named photo.jpg starting with MZ is probably a Windows executable. Both types of files should be rejected before any further inspection.

The zip bomb is a particularly insidious threat. A single attachment can expand from kilobytes to gigabytes when decompressed, potentially filling a container's disk space if not capped. Therefore, any archives decompressed should have both a cap on the decompressed size and a cap on the file count, with decompression halted immediately upon exceeding either limit. Decompressing into a temporary directory without such caps leaves systems vulnerable to disk filling.

Encrypted archives and macro documents present additional dangers. A password-protected zip file cannot be scanned and is specifically designed to evade detection. It should either be rejected or quarantined for manual review. Office documents with macros are equally risky and should receive the same treatment. A key operational detail is to scan attachments asynchronously but deliver the message synchronously, accompanied by a quarantine flag.

Blocking the inbound webhook on a virus scan can lead to timeouts, as the sender will retry, resulting in duplicate messages. Volanea mitigates these risks by enforcing size and part-count limits at the API boundary. Attachments are returned as URLs, ensuring that scanning occurs after the message has been safely stored, maintaining system integrity while preventing potential security breaches.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The text/plain part is not optional

Plenty of sending pipelines generate HTML only, let the library add an empty text part, and move on. It works until a recipient client renders the empty part, or a filter scores the message as…

  • Text part serves as fallback for non-HTML clients
  • Proper formatting maintains readable message appearance
  • Avoid template placeholders in text part

How I Built a Boston Common Shadow Study From a Single Map Selection

The setup Last month I wanted a shadow study of Boston Common without downloading LiDAR, learning a full GIS stack, or asking anyone for a license.

  • Defined question focused on Boston Common's southwest lawn shade at 3 pm in December
  • Chose rectangular bounding box encompassing Common plus two blocks in every direction
  • Used stationary elevated camera for consistent comparisons at 9 am, noon, and 3 pm

How to Write a Cover Letter That Gets Read (2026)

Nobody reads generic cover letters. Here is the 3-paragraph formula, with real examples, that makes hiring managers keep reading.

  • Introduce yourself, state the position, and express excitement about the company and role
  • Provide concrete examples of achievements using the Problem-Action-Result framework
  • Reiterate fit for the position, invite further discussion, and avoid generic language

Taiga title matches need project ownership context

Taiga title matches need project ownership context Taiga is a project and issue management application. A public instance may contain backlogs, user stories, sprint plans, repository links, and…

  • Taiga app discovered 6,946 potential matches for title on 2026-11-03
  • Project data requires understanding context including ownership, URLs, and membership
  • ZoomEye can seed Taiga inventory, but organization must classify public/private projects

More from Tuesday 3 November →