pastebin.com’s script has two storage methods: sql and flat-file based storage.
Though I prefer SQL for ease of use and easier interaction with code, I did not like the “public” way the script handled pastes (the paste ID was associated with a primary key in the SQL database which was how paste IDs were assigned too – a clever way to not have to worry about IDs getting re-used) as anyone could just guess URLs to find pastes: http://pb.malloc.us/1, http://pb.malloc.us/2 etc. I really preferred the way pastebin.com currently handles it – which is also the way the flat-file storage method handles it.
Since Malloc’s pastebin was meant to be more tuned to the needs of developers, it needed to be less public than the stock pastebin script was. As such, I modified pb.malloc.us to use a more random ID assignment system and I think it works out just fine.


