Skip to content
Browse files

MDL-37283 import tinymce spellchecker 2.0.6.1

  • Loading branch information...
1 parent 322af44 commit f938b1a89b8f381129120a37915d1b345333b3fb @skodak skodak committed Dec 22, 2012
View
2 lib/editor/tinymce/plugins/spellchecker/changelog.txt
@@ -1,3 +1,5 @@
+Version 2.0.6.1 (2012-11-16)
+ Fixed security issue with google spellchecker.
Version 2.0.6 (2011-09-29)
Fixed incorrect position of suggestion menu.
Fixed handling of mispelled words with no suggestions in PSpellShell engine.
View
2 lib/editor/tinymce/plugins/spellchecker/classes/GoogleSpell.php
@@ -51,6 +51,8 @@ function &getSuggestions($lang, $word) {
}
function &_getMatches($lang, $str) {
+ $lang = preg_replace('/[^a-z\-]/i', '', $lang); // Sanitize, remove everything but a-z or -
+ $str = preg_replace('/[\x00-\x1F\x7F]/', '', $str); // Sanitize, remove all control characters
$server = "www.google.com";
$port = 443;
$path = "/tbproxy/spell?lang=" . $lang . "&hl=en";

0 comments on commit f938b1a

Please sign in to comment.
Something went wrong with that request. Please try again.