summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-09-27 19:23:21 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-11-05 19:44:15 +0100
commit3aa0ba2603e82addaab459f79c79879e1d3b72d5 (patch)
tree0a607e99cea0f85c76bf66a981c503bb3a2f6e32
parentafe624d3e34b698306688c2979e6c5dad596aa37 (diff)
Remove cli client upload handler
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/controllers/file/file_default.php52
-rw-r--r--application/core/MY_Controller.php2
2 files changed, 0 insertions, 54 deletions
diff --git a/application/controllers/file/file_default.php b/application/controllers/file/file_default.php
index 46caf3a23..086d3ebfe 100644
--- a/application/controllers/file/file_default.php
+++ b/application/controllers/file/file_default.php
@@ -893,58 +893,6 @@ class File_default extends MY_Controller {
return $ids;
}
- /**
- * Handles uploaded files
- * @Deprecated only used by the cli client
- */
- function do_upload()
- {
- // stateful clients get a cookie to claim the ID later
- // don't force them to log in just yet
- if (!stateful_client()) {
- $this->muser->require_access("basic");
- }
-
- $ids = array();
-
- $extension = $this->input->post('extension');
- $multipaste = $this->input->post('multipaste');
-
- $files = getNormalizedFILES();
-
- service\files::verify_uploaded_files($files);
- $limits = $this->muser->get_upload_id_limits();
-
- $userid = $this->muser->get_userid();
-
- foreach ($files as $key => $file) {
- $id = $this->mfile->new_id($limits[0], $limits[1]);
-
- // work around a curl bug and allow the client to send the real filename base64 encoded
- // TODO: this interface currently sets the same filename for every file if you use multiupload
- $filename = $this->input->post("filename");
- if ($filename !== false) {
- $filename = base64_decode($filename, true);
- }
-
- // fall back if base64_decode failed
- if ($filename === false) {
- $filename = $file['name'];
- }
-
- $filename = trim($filename, "\r\n\0\t\x0B");
-
- service\files::add_uploaded_file($userid, $id, $file["tmp_name"], $filename);
- $ids[] = $id;
- }
-
- if ($multipaste !== false) {
- $ids[] = \service\files::create_multipaste($ids, $userid, $limits)["url_id"];
- }
-
- $this->_show_url($ids, $extension);
- }
-
function claim_id()
{
$this->muser->require_access();
diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php
index bf81afa14..a354ba656 100644
--- a/application/core/MY_Controller.php
+++ b/application/core/MY_Controller.php
@@ -67,8 +67,6 @@ class MY_Controller extends CI_Controller {
* and we don't want to annoy them when they upload a big file and the
* CSRF check fails.
*/
- "file/do_upload",
- "file/do_paste",
),
);
if (in_array($uri_start, $csrf_whitelisted_handlers["always"])) {