summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-23 19:21:18 +0100
committerYorhel <git@yorhel.nl>2010-12-23 19:21:18 +0100
commitb6f0e0e3c7ac1fafa5a610175008d32b820d3880 (patch)
tree20dca4346b68ad24874e3507ee17031e4e801b53
parentf7e08b1a1bf8c0c3171497b5c1a9de897ddcc267 (diff)
Stopped storing IPs and removed the ip column
It's not used anymore, and it's better to not store it with regards to privacy.
-rwxr-xr-xindex.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/index.cgi b/index.cgi
index 26ba86a..b142325 100755
--- a/index.cgi
+++ b/index.cgi
@@ -11,12 +11,13 @@
# html text,
# date timestamp with time zone NOT NULL DEFAULT now(),
# lastvisit timestamp with time zone NOT NULL DEFAULT now(),
-# ip inet,
# parse_urls boolean NOT NULL DEFAULT false,
# passcode varchar
# );
# ALTER TABLE pastes ADD COLUMN passcode varchar;
+# 2010-12-23:
+# ALTER TABLE pastes DROP COLUMN ip;
use strict;
@@ -145,8 +146,8 @@ sub upload {
msg("You don't have much to paste, do you?", 'backform') if $dat =~ /^[ \n\s\t]*$/s && $s ne 'whitespace';
my $html = $s eq 'nosyntax' ? undef : get_html({ raw => $dat, syntax => $s, parse_urls => $c});
- $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);
+ $db->do('INSERT INTO pastes (code, syntax, wrap, raw, html, parse_urls, passcode) VALUES(?,?,?,?,?,?,?,?)',
+ undef, $code, $s, $w, $dat, $html, $c, $p || undef);
print "Status: 303\n${cookie}Location: http://$ENV{HTTP_HOST}/$code\nContent-type: text/plain\n\nRedirecting...\n";
exit;