Hi Don On 2013-08-07, at 12:05 AM, Don Greer <[email protected]> wrote:
> Francis, > Ok, here you go. > ===================== > [local] > description=Local Users > type=SQL > <snip> > > [DummyLogin] > description=This is a login file with a dummy login for the Sponsor's page > path=/usr/local/pf/conf/dummyLogin > type=Htpasswd > > [DummyLogin rule SponsorAcceptance] > description=If we get here, go ahead and let the guest in. > match=all > action0=mark_as_sponsor=1 > ================= > I've had sponsors working since y'all helped me on 4.0.1. It worked through > 4.0.3 (although there were a few little hiccups along the way :^). My config > may look a little strange because it was important that people be able to > authorize with one click from their smart phones, so I created a dummy login > file and changed the template in the profile so a dummy username and password > were preloaded on the web form for the authorizer. It was decided that the > fact that the message got to their secured email box and they were expecting > it would be sufficient proof that they were the correct person to authorize > the guest. > Looking at the logs, as it stands today, it is getting the username from the > email (which it actually gets the email address for the username as it's > entered in AD, that seems kinda strange) but it fails to accept that email > address as being valid for the domain. Delete your DummyLogin htpasswd source and instead create a local user with the "mark as sponsor" action (Web admin => Configuration => User/Create). The current code requires the sponsor email address to be found in an LDAP, ActiveDirectory or SQL source. When you create a user through the Web interface, it is added to the local SQL source. > For instance, when I test it with my personal computer, I enter my personal > data, and "[email protected]" for the sponsor. This works fine in 4.0.3, > but in 4.0.4 it says "[email protected]" isn't a valid sponsor. Looking > at the logs shows that it finds the user in AD, but still fails. I messed > with this all day today, then rolled back to 4.0.3 when I left. I saved my > work, so I can try again tomorrow, but without two clues to rub together, I'm > not making much progress I'm afraid. > Thanks for any help you can give me. I'm sure you'll find something fairly > obvious wrong and I'll feel dumb, but that's better than making the bruise > on my forehead bigger from banging it on the wall any longer :^). > Don > > -----Original Message----- > From: Francis Lachapelle [mailto:[email protected]] > Sent: Tuesday, August 06, 2013 1:44 PM > To: [email protected] > Subject: Re: [PacketFence-users] 4.0.4: Possible Bug in Sponsored > Registration (maybe other guest registration) > > Hi Don > > On 2013-08-06, at 12:52 PM, Don Greer <[email protected]> wrote: > >> Not sure if this is a fix, or a work around, but I got past this error by >> changing line 189 in ./pf/lib/pf/web/guest.pm to the following: >> if ($source && (ref($source) ne 'ARRAY')) { >> This simply ignores the source if it doesn't return an array >> reference. Yes, I know, this is probably the wrong thing to do :^) > > But yet, it will work. We'll come up with a cleaner fix. > >> Then I get to the next hurdle, which is I no longer match the condition >> "mark_as_sponsor". I've tried very combination I can think of. On the >> profile, I have a rule to define the guest, and a rule to define the >> authentication of the sponsor users, but NOT a rule that explicitly sets up >> the "mark_as_sponsor". Do I now need to add this? > > The sponsors need to be able to authenticate but also require to have the > action "mark as sponsor". Can you share your authentication.conf file? > > FYI, the sponsor email address is validated by the "mark as sponsor" action > when the guest submit the self-registration form. When the sponsor clicks on > the activation link she/he received by email, PacketFence only makes sure the > user is or can authenticate. > > >> Thanks. >> Don >> >> From: Don Greer [mailto:[email protected]] >> Sent: Tuesday, August 06, 2013 8:45 AM >> To: [email protected] >> Subject: [PacketFence-users] 4.0.4: Possible Bug in Sponsored >> Registration (maybe other guest registration) >> >> After upgrading to 4.0.4, when testing the Sponsored Registration, I get >> the following error after entering my registration info: >> [URL: https://pf.../signup?mode=guest-register] >> Software Error: >> Not a HASH reference at /usr/local/pf/lib/pf/web/guest.pm line 189 For >> help, please send mail to the webmaster .... >> >> From the portal_error_log: >> [Tue Aug 06 08:34:56 2013] [error] [Tue Aug 6 08:34:56 2013] -e: Not >> a HASH reference at /usr/local/pf/lib/pf/web/guest.pm line 189.\n [Tue Aug >> 6 08:34:56 2013] -e: Constant subroutine >> ModPerl::ROOT::ModPerl::PerlRun::usr_local_pf_html_captive_2dportal_guest_2dselfregistration_2ecgi::UCHAR_MAX >> redefined at /usr/lib64/perl5/ModPerl/Util.pm line 69. >> [Tue Aug 6 08:34:56 2013] -e: Constant subroutine >> ModPerl::ROOT::ModPerl::PerlRun::usr_local_pf_html_captive_2dportal_guest_2dselfregistration_2ecgi::SIGQUIT >> redefined at /usr/lib64/perl5/ModPerl/Util.pm line 69. >> [Tue Aug 6 08:34:56 2013] -e: Constant subroutine >> ModPerl::ROOT::ModPerl::PerlRun::usr_local_pf_html_captive_2dportal_guest_2dselfregistration_2ecgi::USHRT_MAX >> redefined at /usr/lib64/perl5/ModPerl/Util.pm line 69. >> [Tue Aug 6 08:34:56 2013] -e: Constant subroutine >> ModPerl::ROOT::ModPerl::PerlRun::usr_local_pf_html_captive_2dportal_guest_2dselfregistration_2ecgi::SIG_IGN >> redefined at /usr/lib64/perl5/ModPerl/Util.pm line 69. >> [Tue Aug 6 08:34:56 2013] -e: Constant subroutine >> ModPerl::ROOT::ModPerl::PerlRun::usr_local_pf_html_captive_2dportal_guest_2dselfregistration_2ecgi::SEEK_SET >> redefined at /usr/lib64/perl5/ModPerl/Util.pm line 69. >> >> Those last 5 lines are just the first of probably 50 or more similar >> messages about ModPer/Util.pm line 69. Not sure if these are related or not >> to the hash issue or not. >> >> Any help on this would be appreciated. >> >> Thanks! >> >> Don -- [email protected] :: +1.514.755.3640 :: http://www.inverse.ca Inverse :: Leaders behind SOGo (http://sogo.nu) and PacketFence (http://packetfence.org) ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ PacketFence-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/packetfence-users
