Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blog.limos.fr
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vincent MAZENOD
blog.limos.fr
Commits
ee099c1c
Commit
ee099c1c
authored
5 years ago
by
Vincent Mazenod
Browse files
Options
Downloads
Patches
Plain Diff
fix typo in upload
parent
1cd3e29f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4956
passed
5 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content/slides/1337/md/upload.md
+22
-23
22 additions, 23 deletions
content/slides/1337/md/upload.md
with
22 additions
and
23 deletions
content/slides/1337/md/upload.md
+
22
−
23
View file @
ee099c1c
...
...
@@ -76,10 +76,10 @@ $_FILES['uploaded']['type']
*
déduit de l'entête HTTP
*Content-Type*
de la requête HTTP envoyant le fichier
*
fakable
*
[
mime_content_type
](
http://php.net/manual/fr/function.mime-content-type.php
)
*
[
exif_imagetype
](
http://php.net/manual/fr/function.exif-imagetype.php
)
*
[
finfo_file
](
http://php.net/manual/fr/function.finfo-file.php
)
*
[
getimagesize
](
http://php.net/manual/fr/function.getimagesize.php
)
*
[
<small>
mime_content_type
</small>
](
http://php.net/manual/fr/function.mime-content-type.php
)
*
[
<small>
exif_imagetype
</small>
](
http://php.net/manual/fr/function.exif-imagetype.php
)
*
[
<small>
finfo_file
</small>
](
http://php.net/manual/fr/function.finfo-file.php
)
*
[
<small>
getimagesize
</small>
](
http://php.net/manual/fr/function.getimagesize.php
)
### [security medium](http://dv.wa/vulnerabilities/upload/)
...
...
@@ -90,14 +90,13 @@ bd.php
echo
passthru
(
$_REQUEST
[
'cmd'
])
```
|
Command
|
Output
|
|
<small>
Command
</small>
|
<small>
Output
</small>
|
| --------------------------- |:------------------:|
| $_FILES
[
'uploaded'
][
'type'
]
| application/x-php |
| mime_content_type | text/x-php |
| exif_imagetype | null (no image) |
| finfo_file | text/x-php |
| getimagesize[2] | null (no image) |
<!-- .element class="table-striped table-bordered table-hover" style="width: 100%" -->
|
<small>
$_FILES
[
'uploaded'
][
'type'
]
</small>
|
<small>
application/x-php
</small>
|
|
<small>
mime_content_type
</small>
|
<small>
text/x-php
</small>
|
|
<small>
exif_imagetype
</small>
|
<small>
null (no image)
</small>
|
|
<small>
finfo_file
</small>
|
<small>
text/x-php
</small>
|
|
<small>
getimagesize[2]
</small>
|
<small>
null (no image)
</small>
|
### [security medium](http://dv.wa/vulnerabilities/upload/)
...
...
@@ -106,13 +105,13 @@ echo passthru($_REQUEST['cmd'])
[

<!-- .element style="width: 50px" -->
](images/upload/lego.jpeg)
|
Command
|
Output
|
|
<small>
Command
</small>
|
<small>
Output
</small>
|
| --------------------------- |:------------------:|
| $_FILES
[
'uploaded'
][
'type'
]
| image/jpeg |
| mime_content_type | image/jpeg |
| exif_imagetype | 2 (IMAGETYPE_JPEG) |
| finfo_file | image/jpeg |
| getimagesize[2] | image/jpeg |
|
<small>
$_FILES
[
'uploaded'
][
'type'
]
|
<small>
image/jpeg |
|
<small>
mime_content_type |
<small>
image/jpeg |
|
<small>
exif_imagetype |
<small>
2 (IMAGETYPE_JPEG) |
|
<small>
finfo_file |
<small>
image/jpeg |
|
<small>
getimagesize[2] |
<small>
image/jpeg |
<!-- .element class="table-striped table-bordered table-hover" style="width: 100%" -->
...
...
@@ -131,13 +130,13 @@ echo passthru($_REQUEST['cmd'])

<!-- .element style="width: 50px" -->
|
Command
|
Output
|
|
<small>
Command
</small>
|
<small>
Output
</small>
|
| --------------------------- |:------------------:|
| $_FILES
[
'uploaded'
][
'type'
]
|
application/x-php |
| mime_content_type | image/jpeg |
| exif_imagetype | 2 (IMAGETYPE_JPEG) |
| finfo_file | image/jpeg |
| getimagesize[2] | null (no image) |
|
<small>
$_FILES
[
'uploaded'
][
'type'
]
</small>
|
<small>
application/x-php
</small>
|
|
<small>
mime_content_type
</small>
|
<small>
image/jpeg
</small>
|
|
<small>
exif_imagetype
</small>
|
<small>
2 (IMAGETYPE_JPEG)
</small>
|
|
<small>
finfo_file
</small>
|
<small>
image/jpeg
</small>
|
|
<small>
getimagesize[2]
</small>
|
<small>
null (no image)
</small>
|
<!-- .element class="table-striped table-bordered table-hover" style="width: 100%" -->
Note:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment