-
Notifications
You must be signed in to change notification settings - Fork 62
fix/ escape SQL values #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -993,6 +993,7 @@ public function readUploadedFile($options = []) | |
| ), | ||
| ]; | ||
| } | ||
| unset($_FILES['filename']); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After move_uploaded_file(), the temporary file is deleted, but $_FILES['filename'] still contains its path. Later, when rendering the page, Html::footer() calls createFromGlobals(). An UploadedFile instance is created for each entry, and it checks whether the temporary file still exists. Since the file has already been moved and no longer exists, an exception is thrown. unset() clears the corresponding entry from $_FILES after the file has been moved. |
||
| } | ||
|
|
||
| //If file has not the right extension, reject it and delete if | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An exception should be thrown or a warning logged if
$extrais not an array and is not empty