Ignore:
Timestamp:
Sep 13, 2013, 9:26:31 PM (11 years ago)
Author:
chronos
Message:
  • Added: Access to RSS channels restricted to higher level user with API token.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/News/RSS.php

    r581 r585  
    3535          $this->RawPage = true;
    3636         
    37           if(array_key_exists($_GET['channel'], $this->System->ModuleManager->Modules['News']->RSSChannels))
     37          if(array_key_exists('channel', $_GET)) $ChannelName = $_GET['channel'];
     38            else $ChannelName = '';
     39          if(array_key_exists('token', $_GET)) $Token = $_GET['token'];
     40            else $Token = '';
     41          if(array_key_exists($ChannelName, $this->System->ModuleManager->Modules['News']->RSSChannels))
    3842          {
    39             $Channel = $this->System->ModuleManager->Modules['News']->RSSChannels[$_GET['channel']];
    40             if($this->System->User->Licence($Channel['Permission']))
     43            $Channel = $this->System->ModuleManager->Modules['News']->RSSChannels[$ChannelName];           
     44            if($this->System->User->Licence($Channel['Permission']) or
     45            $this->System->User->CheckToken($Channel['Permission'], $Token))
    4146            {
    4247            if(is_string($Channel['Callback'][0]))
Note: See TracChangeset for help on using the changeset viewer.