Commit Diff


commit - 20e394d0d3aa5d6f86fe34d92355ee7045cab622
commit + 2e1b99a22157b6888c792dde86f545ee9599280c
blob - 0faca19621f75d24660b9c6fefa97fd4a32bd7e0
blob + b973e807e07c800487fca007ae920e02156597b6
--- paste.pl
+++ paste.pl
@@ -23,7 +23,7 @@ post '/' => sub {
 
     if ($content =~ /\w/) {  # Check if content contains any word character
         my $expires = time() + (60 * 60 * 24 * 60); # 60 days from now
-        my $id = int(rand(1000000));
+        my $id = int(rand(1000000000));
         my $sth = $dbh->prepare("INSERT INTO pastes (id, content, expires) VALUES (?, ?, ?)");
         $sth->execute($id, $content, $expires);
         write_file("pastes/$id.txt", $content);