Skip to content

Commit 109f50a

Browse files
committed
deprecate Security::sanitizeFilename and SecurityInterface::sanitizeFilename
1 parent cf02014 commit 109f50a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

system/Security/Security.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ public function shouldRedirect(): bool
427427
* e.g. file/in/some/approved/folder.txt, you can set the second optional
428428
* parameter, $relativePath to TRUE.
429429
*
430+
* @deprecated 4.6.2 Use `sanitize_filename()` instead
431+
*
430432
* @param string $str Input file name
431433
* @param bool $relativePath Whether to preserve paths
432434
*/

system/Security/SecurityInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public function shouldRedirect(): bool;
6666
* e.g. file/in/some/approved/folder.txt, you can set the second optional
6767
* parameter, $relativePath to TRUE.
6868
*
69+
* @deprecated 4.6.2 Use `sanitize_filename()` instead
70+
*
6971
* @param string $str Input file name
7072
* @param bool $relativePath Whether to preserve paths
7173
*/

user_guide_src/source/changelogs/v4.6.2.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Changes
2828
Deprecations
2929
************
3030

31+
- **Security:** The ``Security::sanitizeFilename()`` method is deprecated. Use ``sanitize_filename()`` instead.
32+
- **Security:** The ``SecurityInterface::sanitizeFilename()`` method is deprecated.
33+
3134
**********
3235
Bugs Fixed
3336
**********

0 commit comments

Comments
 (0)