Beispiel #1
0
 public function getDynamicRedirect($fallbackUrl = false, $useReferrer = true)
 {
     $input = $this->_input->filter(array('redirect' => XenForo_Input::STRING, 'timestamp' => XenForo_Input::UINT, 'md5' => XenForo_Input::STRING));
     if (!empty($input['md5']) && md5($input['redirect']) === bdApi_Crypt::decryptTypeOne($input['md5'], $input['timestamp'])) {
         $this->_bdApi_redirect = $input['redirect'];
         return $input['redirect'];
     }
     return parent::getDynamicRedirect($fallbackUrl, $useReferrer);
 }
Beispiel #2
0
 public function getDynamicRedirect($fallbackUrl = false, $useReferrer = true)
 {
     $input = $this->_input->filter(array('redirect' => XenForo_Input::STRING, 'timestamp' => XenForo_Input::UINT, 'md5' => XenForo_Input::STRING));
     if (!empty($input['md5']) && !empty($input['timestamp']) && !empty($input['redirect'])) {
         $md5 = '';
         try {
             $md5 = bdApi_Crypt::decryptTypeOne($input['md5'], $input['timestamp']);
         } catch (XenForo_Exception $e) {
             if (XenForo_Application::debugMode()) {
                 $this->_response->setHeader('X-Api-Exception', $e->getMessage());
             }
         }
         if (!empty($md5) && $md5 === md5($input['redirect'])) {
             $this->_bdApi_redirect = $input['redirect'];
             return $input['redirect'];
         }
     }
     return parent::getDynamicRedirect($fallbackUrl, $useReferrer);
 }