change the way magic-auth works - we rarely need a destination channel and if that channel has problems
it shouldn't mess up authentication to the hub.
This commit is contained in:
parent
dd6c64f95a
commit
fa8f26c544
15
mod/post.php
15
mod/post.php
@ -15,8 +15,8 @@ function post_init(&$a) {
|
||||
// as a get request, and the only communications to arrive this way.
|
||||
|
||||
if(argc() > 1) {
|
||||
|
||||
$webbie = argv(1);
|
||||
}
|
||||
|
||||
if(array_key_exists('auth',$_REQUEST)) {
|
||||
logger('mod_zot: auth request received.');
|
||||
@ -39,13 +39,17 @@ function post_init(&$a) {
|
||||
$desturl = $dest;
|
||||
break;
|
||||
}
|
||||
if($webbie) {
|
||||
$c = q("select * from channel where channel_address = '%s' limit 1",
|
||||
dbesc($webbie)
|
||||
);
|
||||
if(! $c) {
|
||||
logger('mod_zot: auth: unable to find channel ' . $webbie);
|
||||
// They'll get a notice when they hit the page, we don't need two of them.
|
||||
goaway($desturl);
|
||||
// In fact we only need the name to map the destination, auth can proceed
|
||||
// without it.
|
||||
// goaway($desturl);
|
||||
}
|
||||
}
|
||||
|
||||
// Try and find a hubloc for the person attempting to auth
|
||||
@ -70,7 +74,7 @@ function post_init(&$a) {
|
||||
goaway($desturl);
|
||||
}
|
||||
|
||||
logger('mod_zot: auth request received from ' . $x[0]['xchan_addr'] . ' for ' . $webbie);
|
||||
logger('mod_zot: auth request received from ' . $x[0]['xchan_addr'] . ' for ' . (($webbie) ? $webbie : 'undefined'));
|
||||
|
||||
// check credentials and access
|
||||
|
||||
@ -144,11 +148,6 @@ function post_init(&$a) {
|
||||
|
||||
goaway($desturl);
|
||||
}
|
||||
|
||||
logger('mod_zot: invalid args: ' . print_r($a->argv,true));
|
||||
killme();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2013-11-17.500
|
||||
2013-11-18.501
|
||||
|
Reference in New Issue
Block a user