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

Skip to content

Commit 070b4cf

Browse files
committed
minor #15778 Update upload_file.rst (sfmok)
This PR was submitted for the 5.3 branch but it was merged into the 5.4 branch instead. Discussion ---------- Update upload_file.rst <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- 0f437c0 Update upload_file.rst
2 parents 440c1e3 + 0f437c0 commit 070b4cf

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)