Skip to content

Instantly share code, notes, and snippets.

View ndungtse's full-sized avatar
♾️
Learning never ends

Ndungutse Charles ndungtse

♾️
Learning never ends
View GitHub Profile

Data-URI File Confusion (HWMS-SIG-DUFC-001)

One-line summary

Data-URI File Confusion is a client-side file construction bug where a Base64 Data URI string (e.g. data:image/png;base64,...) is mistakenly wrapped into a File as UTF‑8 text bytes instead of decoding it to binary image bytes, producing an invalid “image file” that some storage backends (e.g. Cloudinary) silently recover while strict object stores (e.g. MinIO) persist as corrupted content.

Background

The digital signature "draw" flow had a silent bug that went undetected while the backend used Cloudinary for file storage. When the project migrated to self-hosted MinIO, the same

@ndungtse
ndungtse / inventory.cpp
Last active June 15, 2024 22:41
cpp program for inventory management
/**
* must be comppiled by g++ 17 or later
*/
#include <iostream>
#include <ctime>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <cctype>