Urgent.News

What's breaking now, across thousands of outlets.

Tech

"Your file never leaves your device": how to test that claim (and the Chromium catch)

Lots of web tools now say "runs in your browser, nothing is uploaded". I make one of them ( Drible , 53 file tools, 48 of which run client-side), and at some point I realised the claim was just a sentence on a page. Nothing would fail if a refactor, a new dependency or an analytics script started sending files somewhere. So I turned the promise into a test. This post is how it works, including a…

Many web tools now claim that their operations run entirely within the browser, with no files uploaded. One such tool (Drible, featuring 53 file tools of which 48 operate client-side) discovered that the claim could be tested. This post explains how to verify such claims, including a specific issue found in Chromium that causes an otherwise-failing test to pass when it shouldn't.

The test involves running a real job in a browser, capturing every network request made during the process, and checking for any that could have transmitted files. Two checks are used: whether the request body contains a file signature (e.g., PDFs start with %PDF, JPEGs with FF D8 FF, PNGs with 89 50 4E 47, HEIC files contain ftypheic) and whether the request method is anything other than a plain GET (POST or PUT could be used to send data). The only request allowed without a visible body is an analytics beacon, provided it remains small.

The test was implemented in Playwright, with a function `watchRequestBodies` monitoring all request bodies. If a request body contains file signatures or is a suspicious non-GET request, it is recorded. A job to test the merge PDF operation was created, which expected no uploads beyond the analytics beacon.

However, a catch was discovered: in Chromium, the test would pass even when files were being uploaded, due to the way Chromium handles file uploads. When a page sends a file as a Blob or File, Chromium does not expose the body through the DevTools protocol used by Playwright, resulting in `postDataBuffer()` returning an empty buffer. This means the test could not detect the uploaded file. The privacy test would incorrectly pass, allowing file uploads to go unnoticed.

To address this, the test was modified to treat any non-GET request as suspicious, regardless of the visible body. This change ensured that the detector would catch uploads even in Chromium, preventing false negatives in privacy tests. In Firefox, the control test (uploading a file via Ghostscript) passed, confirming that the detector worked correctly. In Chromium, the control test failed, highlighting the need for this additional check.

In summary, running a file upload test in the browser requires checking both file signatures in request bodies and non-GET requests to accurately detect file uploads, with special consideration for Chromium's handling of file uploads.

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 Evil of Optional Parameters: When Having too Many Options is Self Destructing

You are the main developer of agents.com, an app that lets an organization manage an army of AI agents. You’re designing an admin page where an admin within an org can see each agent and the skills…

  • Optional parameters create contradictory and impossible states, confusing developers.
  • Defensive code required for consumers to interpret responses, increasing complexity.

From 3 lines to 2 cold emails: a worked example

Most cold emails fail before the first word because the writer never pinned down who they're writing to. Here's the method I use: start from three lines, then build two emails from them.

  • Target niche: independent dental clinics with 2-5 chairs in the US
  • One-line offer: fill last-minute cancelled appointments through text within an hour
  • Three personas: practice owner-dentists, office managers, clinics with new hygienists

I Published 24 Articles in 5 Days. Here's What Actually Moved — and What Took 3 Days to Show Up.

"I Published 24 Articles in 5 Days. Here's What Actually Moved — and What Took 3 Days to Show Up." published: true tags: seo, contentstrategy, webdev, indiehackers description: "A solo dev's content…

  • Developer published 24 articles in 5 days, boosting ToolVault's search visibility
  • Post on post-quantum cryptography climbed to top-10 pages within a day, gaining 18 visits
  • Google Search Console shows impact after 3-day lag, emphasizing importance of 72-hour evaluation

A 10-Point Scorecard for Vetting Telegram Channels Before Adding Them to Your Collection Set

Every Telegram OSINT collection set starts as a pile of channels someone pasted from a Twitter thread. Most of that pile is junk, and the junk is expensive: every junk channel in your collection set…

  • Scorecard assesses Telegram channels across origin, language, cadence, audience, and link hygiene
  • Channels must score at least 7 overall to be included in collection set
  • Origin evaluation checks for original reporting and watermark consistency

Extracting Table Data from PDFs Using Python

PDF is one of the most common document formats in daily work, but its "tables" are a different thing from tables in Excel: a PDF file itself does not store structured table data.

  • Use Spire.PDF library in Python to extract PDF tables
  • Load document with PdfDocument object, create PdfTableExtractor
  • Extract tables page by page using ExtractTable() method

More from Saturday 10 October →