commit 2e1b99a22157b6888c792dde86f545ee9599280c
author: monaco <arianitkukaj@gmail.com>
date: 2023-06-28 22:30
parents: 20e394d0
Update paste.pl
| M | paste.pl | +1 | -1 |
diff --git a/paste.pl b/paste.pl index 0faca19..b973e80 100644 --- a/paste.pl +++ b/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);