Selaa lähdekoodia

Tentative fix for the FCKeditor detection flaw for Firefox 17 - refs #5752

Yannick Warnier 12 vuotta sitten
vanhempi
commit
58699ec3cc
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      main/inc/lib/fckeditor/fckeditor.php

+ 5 - 1
main/inc/lib/fckeditor/fckeditor.php

@@ -58,7 +58,11 @@ function FCKeditor_IsCompatibleBrowser()
     }
     else if ( strpos($sAgent, 'Gecko/') !== false )
     {
-        $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
+        $iVersion = substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
+        if ( preg_match('/^\d{2,3}\.\d{1,4}\s/', $iVersion) ) {
+          return true;
+        }
+        $iVersion = (int)$iVersion;
         return ($iVersion >= 20030210) ;
     }
     else if ( strpos($sAgent, 'Opera/') !== false )