Browse Source

urilize will generate urls starting with //, ensure that we are detecting them in case of double protectPicture

pull/1025/head
Timothée Jaussoin 4 years ago
parent
commit
fd6e363f87
  1. 1
      app/helpers/UtilsHelper.php

1
app/helpers/UtilsHelper.php

@ -734,6 +734,7 @@ function getSmileyPath($id)
function protectPicture($url)
{
$emptyPicture = \Movim\Route::urlize('picture', '');
$emptyPicture = preg_replace("(^//)", 'https://', $emptyPicture);
// The picture is already protected
if (substr($url, 0, strlen($emptyPicture)) === $emptyPicture) {

Loading…
Cancel
Save