X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/e60096926213ce02293a261254ff065cae44c1c8..20160104:/cgi-bin/fur?ds=sidebyside diff --git a/cgi-bin/fur b/cgi-bin/fur index 94f6a1e..5db49c4 100755 --- a/cgi-bin/fur +++ b/cgi-bin/fur @@ -7,6 +7,7 @@ BEGIN { ($ENV{PERLINIT}||'') =~ /(.+)/s and eval $1 } +use utf8; use Fcntl qw(:flock :seek :mode); # import from fex.ph @@ -46,6 +47,14 @@ unless (@local_domains or @local_rdomains) { ); } +unless (@local_hosts and ipin($ra,@local_hosts) or + @local_rhosts and ipin($ra,@local_rhosts)) { + html_error($error, + "Registrations from your host ($ra) are not allowed.", + "Contact $ENV{SERVER_ADMIN} for details." + ); +} + # look for CGI parameters our %PARAM; &parse_parameters; @@ -81,9 +90,9 @@ if ($confirm) { } # if (-f "$user/@") { http_die("$user is already activated") } open $user,'>',"$user/@" or http_die("open $user/@ - $!\n"); - print {$user} $id,"\n"; + print {$user} $id,"\n"; close $user or http_die("close $user/@ - $!\n"); - + http_header("200 OK"); print html_header($head); my $url = "$ENV{PROTO}://$ENV{HTTP_HOST}/fup/" . b64("from=$user&id=$id"); @@ -96,11 +105,11 @@ if ($confirm) { '
' 'or you can use:' '
' - '
URL: | $ENV{PROTO}://$ENV{HTTP_HOST}/fup/ |
Sender: | $user |
auth-ID: | $id |