don't magic-auth against a deleted channel
This commit is contained in:
parent
77186fa7cd
commit
fa5366bb95
23
mod/post.php
23
mod/post.php
@ -111,18 +111,23 @@ function post_init(&$a) {
|
|||||||
$c = q("select * from channel where channel_address = '%s' limit 1",
|
$c = q("select * from channel where channel_address = '%s' limit 1",
|
||||||
dbesc($webbie)
|
dbesc($webbie)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
if(! $c) {
|
||||||
|
|
||||||
|
// They are authenticating ultimately to the site and not to a particular channel.
|
||||||
|
// Any channel will do, providing it's currently active. We just need to have an
|
||||||
|
// identity to attach to the packet we send back. So find one.
|
||||||
|
|
||||||
|
$c = q("select * from channel where not ( channel_pageflags & %d ) limit 1",
|
||||||
|
intval(PAGE_REMOVED)
|
||||||
|
);
|
||||||
|
|
||||||
if(! $c) {
|
if(! $c) {
|
||||||
// They are authenticating ultimately to the site and not to a particular channel.
|
|
||||||
// Any channel will do. We just need to have an identity to attach to the
|
|
||||||
// packet we send back.
|
|
||||||
|
|
||||||
$c = q("select * from channel where true limit 1");
|
// nobody here
|
||||||
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.
|
|
||||||
// In fact we only need the name to map the destination, auth can proceed
|
|
||||||
// without it.
|
|
||||||
|
|
||||||
|
logger('mod_zot: auth: unable to find channel ' . $webbie);
|
||||||
|
goaway($desturl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user