Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f437c0

Browse files
sfmokjaviereguiluz
authored andcommitted
Update upload_file.rst
1 parent 440c1e3 commit 0f437c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ There are some important things to consider in the code of the above controller:
199199
#. A well-known security best practice is to never trust the input provided by
200200
users. This also applies to the files uploaded by your visitors. The ``UploadedFile``
201201
class provides methods to get the original file extension
202-
(:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getExtension`),
202+
(:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientOriginalExtension`),
203203
the original file size (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getSize`)
204204
and the original file name (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientOriginalName`).
205205
However, they are considered *not safe* because a malicious user could tamper

0 commit comments

Comments
 (0)