As near as I can tell, the form in my login page is never given
the "user" and "pass" parameters -- the validate_* functions
don't run, but the load_* ones do. What could be causing this?
At first, I thought it was the old PerForm taglib, but the new
PerForm taglib seems to act the same.
I'm really confused by this and would appreciate any feedback.
If I can provide more information, please let me know.
Mark.
--
If you don't have the time to do it right, where are you going to find
the time to do it over?
Setup:
AxKit 1.6
AxKit::XSP::PerForm 1.6
AxKit::XSP::Session 0.92
.htaccess
AuthName Marks
PerlSetVar MarksLoginScript /login.xsp
AuthType Apache::AxKit::Plugin::Session
PerlAuthenHandler Apache::AxKit::Plugin::Session->authenticate
PerlAuthzHandler Apache::AxKit::Plugin::Session->authorize
PerlSetVar AuthCookieURLDebug 10
require [EMAIL PROTECTED]
errror.log
[error] =======
authenticate(Apache::AxKit::Plugin::Session,Apache=SCALAR(0x8ef31c0))
[error] auth_name= 'Marks'
[error] ======= key()
[error] - session: , referer:
http://mahtest.everybody.org/blog/admin/editarticle.xml
[error] - session after stripping: blog, prefix: Session-
[error] session provided = ''
[error] requested uri = '/blog/admin/editarticle.xml'
[error] --------- save_reason(Apache::AxKit::Plugin::Session,no_session_provided)
[error] ======= save_reason(Apache::AxKit::Plugin::Session,no_session_provided)
[error] =======
send_cookie(Apache::AxKit::Plugin::Session,name,Reason,value,no_session_provided)
[error] Sent cookie:
Apache::AxKit::Plugin::Session_MarksReason=no_session_provided;
domain=mahtest.everybody.org; path=/; expires=Tue, 03-Sep-2002 04:57:18 GMT
[error] --------- save_reason(Apache::AxKit::Plugin::Session,)
[error] ======= save_reason(Apache::AxKit::Plugin::Session,)
[error] ======= login_form(Apache::AxKit::Plugin::Session)
[error] Internally redirecting to /login.xsp
[error] =======
translate_session_uri(Apache::AxKit::Plugin::Session,Apache=SCALAR(0x8ef31c0))
[error] uri: /login.xsp
[error] =======
translate_session_uri(Apache::AxKit::Plugin::Session,Apache=SCALAR(0x9630bf0))
[error] uri: /sheet/main.xsl
/login.xsp:
<?xml version="1.0"?>
<?xml-stylesheet href="" type="application/x-xsp"?>
<?xml-stylesheet href="/sheet/main.xsl" type="text/xsl"?>
<xsp:page
xmlns:session="http://www.apache.org/1999/XSP/Session"
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:f="http://axkit.org/NS/xsp/perform/v1"
xmlns:auth="http://www.creITve.de/2002/XSP/Auth"
language="Perl">
<xsp:logic>
use Net::LDAP;
use Net::LDAP::Entry;
sub validate_user { $_[1] }
sub validate_pass {
my $c = shift;
my $passwd = shift;
die $passwd;
my $user = $c->{Form}{user};
my $ldap = Net::LDAP->new("localhost", onerror=>"die");
$ldap->bind;
my $res = $ldap->search(filter => "mail=$user",
base => "o=top");
die "LDAP error on login: ", $res->error
if $res->code;
die "Password or Username incorrect"
if $res->count == 0;
$res = $res->pop_entry;
$res = $ldap->bind($res->dn,
password => $passwd);
die "Couldn't login: ", $res->error
if $res->code;
}
sub submit_login {
my $c = shift;
$r->header_in("referer")
}
</xsp:logic>
<page>
<head>
<title>Login</title>
</head>
<body>
<f:form>
<login-box>
<username>
<f:textfield name="user"/>
</username>
<password>
<f:password name="pass"/>
</password>
<f:submit name="login" value="login" goto="/"/>
</login-box>
</f:form>
</body>
</page>
</xsp:page>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]