Commit graph

14 commits

Author SHA1 Message Date
Eugene Sandulenko
fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Alexander Tkachev
97cf2be7ef CLOUD: Update LocalWebserver
Reader now reads headers into stream, and some checks are added there
and in UploadFileClientHandler, so if headers are too long, they are
treated as bad request.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
acfa1d1f10 CLOUD: Handle paths in marked places
Paths containing '../' are forbidden to use in Files Manager. There is
also a special inner black list of paths which are not used and a check
that specified path is under "savepath" or "rootpath" (from "cloud"
domain).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
dd9e5a95dc CLOUD: Mark places where path handling is needed 2016-08-24 16:07:55 +06:00
Alexander Tkachev
712410496e CLOUD: Fix UploadFileClientHandler
It now redirects user on success not only when file was the last field
in the content, but also when it was uploaded already and Handler worked
further to search for more files.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
2c34864a06 CLOUD: Fix UploadFileClientHandler
A few possible memory leaks about `_contentStream` there.
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
d57fca4665 CLOUD: JANITORIAL: Fix code formatting 2016-08-24 16:07:55 +06:00
Peter Bozsó
9254df2d96 CLOUD: Fix code formatting 2016-08-24 16:07:55 +06:00
Alexander Tkachev
438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
da229dd84c CLOUD: Add "ajax" parameter for "/create" and "/upload"
If it's set, these redirect to "/filesAJAX" instead of "/files".
2016-08-24 16:07:55 +06:00
Alexander Tkachev
389c669a47 CLOUD: Add "directory" form for webserver "/upload"
The attribute is Chrome-only.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3064b44b92 CLOUD: Switch to "multiple" files uploading
Still doesn't support directories uploading.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7fcdcc10cb CLOUD: Cleanup in UploadFileClientHandler
Adds Client::noMoreContent() and Reader::noMoreContent(), which return
true when whole client's request was read.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e4bb7c4e75 CLOUD: Add UploadFileClientHandler
Now Client reads the first headers block, then LocalWebserver decides
which Handler to use. In case of "/upload", UploadFileHandler is used.

But now it only knows the "path" parameter. If that's valid, actual
UploadFileClientHandler is created, which reads the contents of the
request and, when finds there  an "upload_file" field, starts saving it
in the directory specified by "path".

With that we don't need temp files approach from Reader class.
2016-08-24 16:07:55 +06:00