Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix broken redirect call; add redirect to login for anon users trying…

… to get the login.pl forms
  • Loading branch information...
commit 085b8cdc82600162f8f23766000b9aa1721d723d 1 parent 5dc6fa0
@pudge pudge authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 themes/slashcode/htdocs/users.pl
View
7 themes/slashcode/htdocs/users.pl
@@ -306,7 +306,7 @@ sub main {
# this will only redirect if it is a section-based rootdir, and
# NOT an isolated section (which has the same rootdir as real_rootdir)
} elsif ($op eq 'userclose' && $constants->{rootdir} ne $constants->{real_rootdir}) {
- redirect($constants->{real_rootdir}, '/users.pl?op=userclose');
+ redirect($constants->{real_rootdir} . '/login.pl?op=userclose');
} elsif ($op eq 'savepasswd') {
my $error_flag = 0;
@@ -336,8 +336,9 @@ sub main {
# Figure out what the op really is.
$op = 'userinfo' if (! $form->{op} && ($form->{uid} || $form->{nick}));
$op ||= $user->{is_anon} ? 'userlogin' : 'userinfo';
- if ($user->{is_anon} && $ops->{$op}{seclev} > 0) {
- $op = 'default';
+ if ($user->{is_anon} && ( ($ops->{$op}{seclev} > 0) || ($op =~ /^newuserform|mailpasswdform|displayform$/) )) {
+ redirect($constants->{real_rootdir} . '/login.pl');
+ return;
} elsif ($user->{seclev} < $ops->{$op}{seclev}) {
$op = 'userinfo';
}
Please sign in to comment.
Something went wrong with that request. Please try again.