Fixed Testing URL unfurling does not return a useful error for a bad url

Xon

Well-known member
Affected version
2.2.9
The actionTestUrlUnfurling function will silently fail if given a URL which the URL validator doesn't consider valid.

PHP:
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 = null;
}

I'ld expect something like "invalid URL" or similar, not just it to silently fail to give an error message
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.13).

Change log:
Display an error when an invalid URL is used to test URL unfurling
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom