Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rss blocking
#1
hello again

can we somehow disable (allow for specific IPs) RSS?

http://ourpandora/operation/events/events_rss.php is readable by whole world..

"IP list with API access" is this setting affecting this behaviour?

thanks
 Reply
#2
Nope at this version, but it's a very nice idea. I've added to our feature request tracker !

Try adding this code to events_rss.php, should work:

$ipOrigin = $_SERVER['REMOTE_ADDR'];

/**
*
* @param $ip
* @return unknown_type
*/
function isInACL($ip) {
        global $config;

        //If set * in the list ACL return true
        if(in_array('*', $config['list_ACL_IPs_for_API']))
                return true;

        if (in_array($ip, $config['list_ACL_IPs_for_API']))
                return true;
        else
                return false;
}

if (!isInACL($ipOrigin)) {
    exit;
}
 Reply
#3
BTW it's so easy that I've commited to our SVN code repository Smile

Thx for the idea !
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes