mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 14:55:13 -04:00
Temporarily disable feed authentication
This commit is contained in:
parent
30442c0c62
commit
7341304729
1 changed files with 14 additions and 14 deletions
|
@ -18,23 +18,23 @@ try{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certain user agents may bypass login entirely
|
// Certain user agents may bypass login entirely
|
||||||
if(isset($_SERVER['HTTP_USER_AGENT'])){
|
// if(isset($_SERVER['HTTP_USER_AGENT'])){
|
||||||
$isUserAgentAllowed = (bool)Db::QueryInt('select count(*) from FeedUserAgents where instr(?, UserAgent) limit 1', [$_SERVER['HTTP_USER_AGENT']]);
|
// $isUserAgentAllowed = (bool)Db::QueryInt('select count(*) from FeedUserAgents where instr(?, UserAgent) limit 1', [$_SERVER['HTTP_USER_AGENT']]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(!$isUserAgentAllowed){
|
// if(!$isUserAgentAllowed){
|
||||||
if($GLOBALS['User'] === null){
|
// if($GLOBALS['User'] === null){
|
||||||
throw new Exceptions\LoginRequiredException();
|
// throw new Exceptions\LoginRequiredException();
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(!preg_match('/\.xml$/ius', $path)){
|
// if(!preg_match('/\.xml$/ius', $path)){
|
||||||
throw new Exceptions\InvalidPermissionsException();
|
// throw new Exceptions\InvalidPermissionsException();
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(!$GLOBALS['User']->Benefits->CanAccessFeeds){
|
// if(!$GLOBALS['User']->Benefits->CanAccessFeeds){
|
||||||
throw new Exceptions\InvalidPermissionsException();
|
// throw new Exceptions\InvalidPermissionsException();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Everything OK, serve the file using Apache.
|
// Everything OK, serve the file using Apache.
|
||||||
// The xsendfile Apache module tells Apache to serve the file, including not-modified or etag headers.
|
// The xsendfile Apache module tells Apache to serve the file, including not-modified or etag headers.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue