update to 7.22

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2013-05-24 13:03:57 +02:00
parent d5097a4bc6
commit 5658794f17
265 changed files with 5551 additions and 8808 deletions

View File

@@ -2578,6 +2578,15 @@ class FileNameMungingTest extends FileTestCase {
$this->assertNotEqual($munged_name, $this->name, t('The new filename (%munged) has been modified from the original (%original)', array('%munged' => $munged_name, '%original' => $this->name)));
}
/**
* Tests munging with a null byte in the filename.
*/
function testMungeNullByte() {
$prefix = $this->randomName();
$filename = $prefix . '.' . $this->bad_extension . "\0.txt";
$this->assertEqual(file_munge_filename($filename, ''), $prefix . '.' . $this->bad_extension . '_.txt', 'A filename with a null byte is correctly munged to remove the null byte.');
}
/**
* If the allow_insecure_uploads variable evaluates to true, the file should
* come out untouched, no matter how evil the filename.