Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
6 posts · #security
Clear filters·5 min read

A Jellyfin image that finishes its own setup wizard from the start script
A fresh Jellyfin server is open to whoever reaches the setup wizard first. My Pterodactyl image closes that gap by completing the wizard over HTTP from a background shell function.
In short
- Jellyfin reads its port from config/network.xml, so the start script rewrites that file on every boot to match the panel allocation.
- A background function polls the server, and if the wizard is still open it completes it with an admin account taken from environment variables.
- If the password variable is empty the script does nothing and says so, rather than inventing a default password.
#docker#bash#jellyfin#pterodactyl#security
·6 min read

Light Browser · Story
My browser's import feature looked exactly like an info-stealer
Reading other browsers' saved logins is what credential stealers do, so antivirus flagged it. I moved the code into a separate on-demand exe and made the installer per-user.
In short
- Profile-reading and DPAPI code moved out of LightBrowser.exe into a separate lbimport.exe, downloaded only when someone clicks import.
- The tracked main build went from 2,345,984 to 1,323,008 bytes.
- A second commit made the installer per-user, so no UAC "unknown publisher" prompt appears on install or update.
#cpp#windows#security#antivirus#installer
·6 min read

Movix · Story
My video token check trusted a header the client sent
A token bound to an IP is only as good as the IP. Mine came from a client header, and a second rule pinned everyone to one fixed address. Three small commits in April 2025 fixed it.
In short
- The requester's address came from a header the client itself sent, so an IP-bound token was bound to whatever the caller claimed.
- Validation also demanded that the request match one fixed address written into the code, a leftover that had to go.
- I switched to the address set by the reverse proxy, made the stored address the only rule, and ran one worker per CPU with respawn.
#express#security#video-streaming#nodejs
·6 min read

Unfair · Story
A memory scanner with a web UI needs a guard and a test for it
Unfair can write into any process I can open, and its Flask UI has no login. The only protection is a localhost check, and the one test that proves it. Design notes from a one-commit repo.
In short
- The repository has a single commit, so this is a design story read from the code and tests, not a bug-fix history.
- The server binds to 127.0.0.1 and a beforerequest hook returns 403 for any other address.
- testweb.py asserts that a request from 10.0.0.5 is refused, so the guard is tested and not only documented.
#python#flask#security#windows
·6 min read

Pterodactyl yolks · Story
SQL Server built fine and could not start under Wings
A passing docker build proved nothing. A file capability on sqlservr and an eval echo on the startup string only showed up once CI booted the image the way Wings does.
In short
- sqlservr ships with the capnetbindservice file capability, and Wings drops that capability, so the kernel refuses to exec it.
- Rewriting each executable removes the capability, and a CI boot test with Wings' uid and dropped capabilities now gates publishing.
- The same test caught the startup string being expanded with eval echo, which ran the panel's console banner as code.
#docker#pterodactyl#sql-server#ci#security
·5 min read

Pterodactyl yolks · Story
A MySQL init file full of passwords, and a CI check that raced it
MySQL's first start needs a SQL file with the root and app passwords in it. I moved it out of the startup line, locked down the run directory, and fixed a test that raced the cleanup.
In short
- The init file is now referenced from the generated config (init-file=...), not appended to the startup line and echoed to the console.
- The socket and pid file moved from /tmp into a run directory created with mode 700.
- The CI step that asserts the init file is gone now waits for the removal instead of racing it.
#mysql#docker#pterodactyl#security#ci