Skip to content

Commit

Permalink
Use $_REQUEST instead of $_GET for the file name param getters.
Browse files Browse the repository at this point in the history
Thanks @vvinhas for the comment:
blueimp@f44f773c9c3e400b420
c8a5de7760bf3b4d652ce#commitcomment-6606586
  • Loading branch information
blueimp committed Jun 29, 2014
1 parent 0f15447 commit 33d816f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/php/UploadHandler.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* jQuery File Upload Plugin PHP Class 8.0.0
* jQuery File Upload Plugin PHP Class 8.0.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Expand Down Expand Up @@ -1133,12 +1133,12 @@ protected function get_singular_param_name() {

protected function get_file_name_param() {
$name = $this->get_singular_param_name();
return isset($_GET[$name]) ? basename(stripslashes($_GET[$name])) : null;
return isset($_REQUEST[$name]) ? basename(stripslashes($_REQUEST[$name])) : null;
}

protected function get_file_names_params() {
$params = isset($_GET[$this->options['param_name']]) ?
$_GET[$this->options['param_name']] : array();
$params = isset($_REQUEST[$this->options['param_name']]) ?
$_REQUEST[$this->options['param_name']] : array();
foreach ($params as $key => $value) {
$params[$key] = basename(stripslashes($value));
}
Expand Down

0 comments on commit 33d816f

Please sign in to comment.