ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
FilenameSanitizer.php
Go to the documentation of this file.
1
<?php
2
3
namespace
ILIAS\Filesystem\Security\Sanitizing
;
4
5
/******************************************************************************
6
*
7
* This file is part of ILIAS, a powerful learning management system.
8
*
9
* ILIAS is licensed with the GPL-3.0, you should have received a copy
10
* of said license along with the source code.
11
*
12
* If this is not the case or you just want to try ILIAS, you'll find
13
* us at:
14
* https://www.ilias.de
15
* https://github.com/ILIAS-eLearning
16
*
17
*****************************************************************************/
31
interface
FilenameSanitizer
32
{
36
public
const
CLEAN_FILE_SUFFIX
=
'sec'
;
37
48
public
function
isClean
(
string
$filename
): bool;
49
50
59
public
function
sanitize
(
string
$filename): string;
60
}
ILIAS\Filesystem\Security\Sanitizing\FilenameSanitizer\sanitize
sanitize(string $filename)
Validates the file ending, with the filesystem whitelist provided by ILIAS.
ILIAS\Filesystem\Security\Sanitizing\FilenameSanitizer\isClean
isClean(string $filename)
Checks if the filename is prefixed with a valid whitelisted ending.
ILIAS\Filesystem\Security\Sanitizing
Definition:
FilenameSanitizer.php:3
ILIAS\Filesystem\Security\Sanitizing\FilenameSanitizer
Definition:
FilenameSanitizer.php:31
ILIAS\Filesystem\Security\Sanitizing\FilenameSanitizer\CLEAN_FILE_SUFFIX
const CLEAN_FILE_SUFFIX
This file suffix will be used to sanitize not whitelisted file names.
Definition:
FilenameSanitizer.php:36
$filename
$filename
Definition:
buildRTE.php:78
src
Filesystem
Security
Sanitizing
FilenameSanitizer.php
Generated on Tue Sep 2 2025 22:02:54 for ILIAS by
1.8.13 (using
Doxyfile
)