Show HN: A friend and I made a beautiful pastebin
pastery.net
pastery.net
Using only 6 characters as a 'private' URL is too small. How long does it take to have a bot that can make 1000 requests per second to download every single URL in your URL space?
((alphabet_size^number_url_characters)/(request_speed))/secs/mins/hrs = time_in_days
((26^6)/(1000))/60/60/24 = 3.6 days
Reading every single paste in 3.6 days is not private.
You want to reduce the probability of a single URL guess colliding with an existing 'private' URL so that it would take years for a bot to have a decent chance of finding a URL that is already in use.
Read up on the probability of hashing collisions and how fast bots can make requests. Make sure it takes a long time to make enough guesses to have a chance at collision.
If you don't want to do math, just use as many characters as an established company that already has 'private URL sharing'. ex Dropbox, I think they use ~40 case-sensitive-alphanumeric-characters or something.
The right fix would be to increase the length of your key.
Then you get URL's with easy-to-remember names like "TyrannicLavendarOrangutan"
And "right" as in your solution doesn't solve the problem. It just limits it to "people with botnets".
I'm a bit confused by the language selector menu, though. It looks like it's disabled ("faded out") until I hover over it. At first I thought it was just permanently disabled and wondered why it was on the page in the first place. I think you guys might be trying to do something a little unnecessarily fancy there.
(Also, and you may already know this, all of the links in the footer are broken.)
I fixed the links, thanks for the heads up! I pushed a refactoring a few minutes ago that broke them, I need to write some more tests. They're up now, if you want to read!