diff options
author | Yorhel <git@yorhel.nl> | 2010-10-08 18:54:26 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-10-08 18:54:26 +0200 |
commit | 38a9eb5a829802fcca1856278149f27867d2f2ed (patch) | |
tree | 2377afbfb5be0fa442c172490f004ba23c5b4966 /index.cgi | |
parent | 133e8f8fb38a482af163297254db07cbef395ef3 (diff) |
Fixed bug when pasting something without passcode.
Don't worry, we found this bug in time.
Diffstat (limited to 'index.cgi')
-rwxr-xr-x | index.cgi | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |