X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/97b87610331f53e756d032ad21db786037f921a1..20160104:/cgi-bin/fur?ds=inline diff --git a/cgi-bin/fur b/cgi-bin/fur index 2a75445..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 @@ -39,16 +40,17 @@ my $user = my $id = my $verify = ''; &check_maint; -unless (@local_domains and @local_rdomains) { +unless (@local_domains or @local_rdomains) { html_error($error, "No domains for registrations are defined.", "Contact $ENV{SERVER_ADMIN} for details." ); } -unless (@local_hosts and ipin($ENV{REMOTE_ADDR}||0,@local_hosts)) { +unless (@local_hosts and ipin($ra,@local_hosts) or + @local_rhosts and ipin($ra,@local_rhosts)) { html_error($error, - "Registrations from your host ($ENV{REMOTE_ADDR}) are not allowed.", + "Registrations from your host ($ra) are not allowed.", "Contact $ENV{SERVER_ADMIN} for details." ); } @@ -88,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"); @@ -103,11 +105,11 @@ if ($confirm) { '
' 'or you can use:' '
' - '
URL: | $ENV{PROTO}://$ENV{HTTP_HOST}/fup/ |
Sender: | $user |
auth-ID: | $id |