[RSS Feed/News] Testing URL unfurling does not return a useful error for a bad url

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
The actionTestUrlUnfurling function will silently fail if given a URL which the URL validator doesn't consider valid.

PHP:

Code:
public function actionTestUrlUnfurling()
{
   $this->setSectionContext('testUrlUnfurling');

   $urlValidator = \XF::app()->validator('Url');

   $url = $this->filter('url', 'str');
   $url = $urlValidator->coerceValue($url);

   if ($this->isPost()  && $url && $urlValidator->isValid($url))
   {
...
   }
else
{
   $results = false;
   $error = false;
   $body =...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom