ILIAS  release_7 Revision v7.30-3-g800a261c036
FilenameSanitizer.php
Go to the documentation of this file.
1<?php
2
4
16{
17
21 const CLEAN_FILE_SUFFIX = 'sec';
22
30 public function isClean(string $filename) : bool;
31
38 public function sanitize(string $filename) : string;
39}
$filename
Definition: buildRTE.php:89
An exception for terminatinating execution or to throw for unit testing.
const CLEAN_FILE_SUFFIX
This file suffix will be used to sanitize not whitelisted file names.
isClean(string $filename)
Checks if the filename is prefixed with a valid whitelisted ending.
sanitize(string $filename)
Validates the file ending, with the filesystem whitelist provided by ILIAS.