3c3 < # Pappalapapp 0.5 - A Web-page commenting system --- > # Pappalapapp 0.5.1 - A Web-page commenting system 115a116,126 > # accept_without_referer [01] > # The scritpt uses the HTTP_REFERER to refuse a submissions that > # comes from somewhere else. > # Unfortunately tools like junkbuster remove the HTTP_REFERER, so > # the users of these tools won't be able to submit. > # "0" makes pappalapapp proof for spam transmissions, but > # junkbuster-users won't be able to submit > # "1" accepts junkbuster, but also some evil bots that may be around > # (it will still refuse invalid referers) > my $accept_without_referer = 1; > 122c133 < my $version = "0.5"; --- > my $version = "0.5.1"; 993a1005 > # if $accept_without_referer is 1: accept also with empty referer 995c1007,1010 < if ($ENV{'HTTP_REFERER'} !~ m/^$myself/) { --- > my $referer = $ENV{'HTTP_REFERER'} || 'missing'; > my $ref_valid = ($referer =~ m/^$myself/) ? 1:0; > my $ref_missing = ($referer eq 'missing') ? 1:0; > if (!(($accept_without_referer and $ref_missing) or $ref_valid)) {