MDL-11845 fixed security issues in curl related code in new download_file_content() + minor fixes in Snoopy; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2007-12-31 23:18:06 +00:00
parent 407d81349c
commit 599f06cff1
2 changed files with 77 additions and 32 deletions

View file

@ -259,7 +259,7 @@ class Snoopy
break;
default:
// not a valid protocol
$this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
$this->error = 'Invalid protocol "'.$URI_PARTS["scheme"]; // moodlefix
return false;
break;
}
@ -425,7 +425,7 @@ class Snoopy
default:
// not a valid protocol
$this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
$this->error = 'Invalid protocol "'.$URI_PARTS["scheme"]; //moodlefix
return false;
break;
}
@ -720,13 +720,13 @@ class Snoopy
chr(176),
chr(39),
chr(128),
"ä",
"ö",
"ü",
"Ä",
"Ö",
"Ü",
"ß",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
);
$text = preg_replace($search,$replace,$document);