php login and graceperiod

64 views
Skip to first unread message

aeto...@gmail.com

unread,
Aug 14, 2013, 3:41:27 AM8/14/13
to mod_auth_p...@googlegroups.com
I have tried this module in apache 2.2.21 and PHP 5.3 and always the login fail with the message:

You don't have permission to access the desired resource on {mydomainname}.gr, you may try logging in again with different credentials.

I tried to find the problem and I noticed that in php-login/login.php file, in line 150 (approximately) there is the code bellow:

if (pubtkt_verify($pubkeyfile, $keytype, $ticket) && isset($tkt_graceperiod)
   && is_numeric($tkt_graceperiod) && ($tkt_graceperiod <= time()) 
   && (time() <= $tkt_validuntil)) {
........
}
 First of all the $ticket is array ($ticket = pubtkt_parse($_COOKIE['auth_pubtkt']);) and pubtkt_verify function needs ticket as string. Therefore, I replaced $ticket with $_COOKIE['auth_pubtkt'];

The if check: ( $tkt_graceperiod <= time())  always returns false. This is normal because tkt_graceperiod = 86400 (the default) - 3600 (as far I know from the documents) and therefore is always <= of time() since my login tries are some minutes after cookie creation.

Is that normal?

I tried to get rid of the check ($tkt_graceperiod <= time()) but still there is redirection to login again form.

Is there any windows-apache-user who uses the module successfully?  


jerryb...@gmail.com

unread,
Aug 14, 2013, 7:23:55 AM8/14/13
to mod_auth_p...@googlegroups.com
We are using it successfully on windows, but not being near the server, I can't report our server version, or whether we made any tweaks.

Sent from my iPad
--
 
---
You received this message because you are subscribed to the Google Groups "mod_auth_pubtkt users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod_auth_pubtkt-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Wittkoski

unread,
Aug 17, 2013, 2:02:20 AM8/17/13
to mod_auth_p...@googlegroups.com
Note that the graceperiod value is a unix time value like validuntil. It is not a duration or length like it's name may imply.

    --John
Reply all
Reply to author
Forward
0 new messages