Hey everyone,
I would like to block an additional domain from self-registering as guests
on our network. In the Email source, I unchecked allow local domain, and
then in guest.pm, I modified the code in validate_selfregistration to this:
if ($source) {
unless (isenabled($source->{allow_localdomain})) {
# You should not register as a guest if you are part of the
local network
my $localdomain = $Config{'general'}{'domain'};
my $localdomain2 = 'willamette.edu';
if ($cgi->param('email') =~ /[@\.]$localdomain$/i) {
return ($FALSE, $GUEST::ERROR_EMAIL_UNAUTHORIZED_AS_GUEST,
[ $localdomain ]);
}
if ($cgi->param('email') =~ /[@\.]$localdomain2$/i) {
return ($FALSE, $GUEST::ERROR_EMAIL_UNAUTHORIZED_AS_GUEST,
[ $localdomain2 ]);
}
}
}
Based this on the blog post I found here:
http://mrfogg97.blogspot.com/2013/07/packetfence-guest-email-domains-check.html
The issue s that people can still register with an @willamette.edu address.
However, if I try to sign up with an e-mail ending in the domain configured
for the packetfence server, it blocks it fine.
I'm skeptical that that code is getting called, because even if I change:
my $localdomain = $Config{'general'}{'domain'};
to
my $localdomain = 'willamette.edu';
I am still unable to register with the configured localdomain, but can
register with an @willamette.edu address.
Is there someplace else I should be attempting to do this? I did restart
the PF service after making the changes.
Thank you!
--
Fletcher Haynes <[email protected]>
Systems Administrator/Network Services Consultant
Willamette Integrated Technology Services
Willamette University, Salem, OR
Phone: 503.370.6016
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users