Better HN
topnewbestaskshowjobs
Log inSign up

tmpyt

10 karma · joined Dec 4, 2020 (5y ago) · 2 submissions

Submissions

comment 5y ago · link · parent

On youtube, uploaders can switch their videos to be public/private/unlisted anytime, you can't rely on this status to be set in stone at upload.

comment 5y ago · link · parent

That's exactly what youtube originally did - video id is just an encrypted (3DES, iirc) 64-bit sequential primary key straight from mysql database. You can convert it back and forth. Problem: if you know the encryption key (it was sitting right there in the code for all devs to see, easy to steal) you could enumerate all the YT videos, including all unlisted videos. At least until a few years ago - they've since switched to random database keys instead of autoincrement to fix this exact hole.

Source: worked there.