Age | Commit message (Collapse) | Author |
|
If the themepath was defined but the wwwroot.zip file was not in
that path, looking for it failed as it never reached the part of the
code using SearchMan to look for it.
|
|
This means that when using SDL 1.2 we use SDL_net 1.2, but when
using SDL 2 we now use SLD_net 2 as well. Both versions work
properly and there is not code change needed in ScummVM.
This change is because SDL_net depends on SDL, and using
SDL_net 1.2 with SDL 2 means we can end up needing to link with
both the SDL and SDL2 libraries.
|
|
|
|
|
|
concatWithSavesPath() is only defined when curl is used, but was used in
Webserver even when curl is unavailable.
|
|
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.
|
|
I accidentally tried "folder../" instead "folder/../" and understood
that I made "folder../" forbidden too, though it's a valid folder name.
|
|
Now if there is no "rootpath" specified, it's not even listed by
FilesPageHandler and ListAjaxHandler. And, of course, not available to
use anywhere else.
|
|
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).
|
|
|
|
StorageWizardDialog now runs LocalWebserver in "minimal mode" for
security reasons. In this mode server uses only those handlers which
state to support it.
There are two handlers which support minimal mode: IndexPageHandler
(which handles `code` requests needed by StorageWizardDialog) and
ResourceHandler (which provides inner resources like `style.css` or
`logo.png` from `wwwroot.zip` archive).
|
|
Using a dedicated callback object for this was an unnecessary overhead.
|
|
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.
|
|
|
|
|
|
A few possible memory leaks about `_contentStream` there.
|
|
Added prefixes, used debug(9).
|
|
|
|
|
|
|
|
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
|
|
|
|
It now hides code fields not just when built with SDL_Net, but also when
LocalWebserver's using default port.
So that's why NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is defined
in localwebserver.h now.
|
|
It's enabled only when NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is
defined.
It's not defined, because override means we have to reconfigure our
redirect links somehow to use the override port.
|
|
|
|
Now creating directories doesn't refresh the "/filesAJAX" page.
|
|
If it's set, these redirect to "/filesAJAX" instead of "/files".
|
|
|
|
It works already, but still requires some polishing.
|
|
"/list" now returns JSON with directory information. Would be used in
AJAX-based Files Manager.
|
|
|
|
|
|
"/" is used to receive "?code", but when there is no such parameter
passed, it's safe to redirect user to the "/files".
|
|
Works on Linux too. And, well, I'm bad in adding backends, so it's just
#ifdefed there.
|
|
The attribute is Chrome-only.
|
|
|
|
Still doesn't support directories uploading.
|
|
|
|
|
|
Simplified some stuff here and there by using HandlerUtils static
methods.
|
|
|
|
|
|
|
|
Adds Client::noMoreContent() and Reader::noMoreContent(), which return
true when whole client's request was read.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|