summaryrefslogtreecommitdiff
path: root/index.cgi
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-10-08 18:54:26 +0200
committerYorhel <git@yorhel.nl>2010-10-08 18:54:26 +0200
commit38a9eb5a829802fcca1856278149f27867d2f2ed (patch)
tree2377afbfb5be0fa442c172490f004ba23c5b4966 /index.cgi
parent133e8f8fb38a482af163297254db07cbef395ef3 (diff)
Fixed bug when pasting something without passcode.
Don't worry, we found this bug in time.
Diffstat (limited to 'index.cgi')
-rwxr-xr-xindex.cgi2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.cgi b/index.cgi
index 66e009d..e752321 100755
--- a/index.cgi
+++ b/index.cgi
@@ -118,7 +118,7 @@ sub upload {
my $html = $s eq 'nosyntax' ? undef
: decode_utf8(Text::VimColor->new(string => encode_utf8($dat), filetype => $s)->html());
$db->do('INSERT INTO pastes (code, syntax, wrap, raw, html, ip, parse_urls, passcode) VALUES(?,?,?,?,?,?,?,?)',
- undef, $code, $s, $w, $dat, $html, $ENV{REMOTE_ADDR}, $c, $p);
+ undef, $code, $s, $w, $dat, $html, $ENV{REMOTE_ADDR}, $c, $p || undef);
print "Status: 303\n${cookie}Location: http://$ENV{HTTP_HOST}/$code\nContent-type: text/plain\n\nRedirecting...\n";
exit;