Instead of binding to INADDR_ANY as soon as remote_hosts.cfg exists,
only do so if the file actually contains at least one host. Prior to
this change, boinc client would bind to INADDR_ANY even if
--allow_remote_gui_rpc was *not* given and the remote_hosts.cfg
does *not* contain any hosts (but exists). This behavior is not
sensible, because in that case no client would be allowed to connect
eventually.
Furthermore, many distributions ship an example remote_hosts.cfg as
part of their boinc client package. And the previous behavior caused
boinc client to bind on INADDR_ANY, opening a remotely accessible port
per default.
To tighten security further, boinc client will now only
bind to localhost even if remote-hosts.cfg exists, but there are no
remote hosts configured witin that file.
- disable it unless <allow_gui_rpc_get/> is in cc_config.xml
- return 400 and 403 HTTP replies in various error cases
- allow .html, .js, and .css filename extensions
- allow directories in path (but not ..).
Files could be e.g. in project directories.
If the client receives a GET HTTP connection,
it looks for a file of that name (default index.html) in the BOINC data directory
(only .html files, no directory traversal) and returns it.
The goal is to get rid of cross-site constraints in Web-based GUIs.
The name of GUI RPC client will be used when creating an account at a
project that requires users to consent to terms of use. The project will
register both the consent and the GUI that was used to create the
account.
Store API version as well for future use.
- If run with --gui_rpc_unix_domain, the client will listen on
a Unix-domain socket (named "boinc_socket") rather than on a TCP port.
- Add RPC_CLIENT::init_unix_domain() function to C++ GUI RPC interface
(Note: we'll need to add a corresponding function to the Java interface)
- boinccmd: add --unix_domain option
explicit rather than determined by position in a list.
- client: add a new "read-only" attribute for GUI RPCs.
This is in preparation for handling GUI RPCs in separate threads.
- client: remove code to support pre-V6 graphics.
svn path=/trunk/boinc/; revision=24232
I'm working on this case:
- start up
- disconnect (produces notice)
- reconnect (removes notice)
The client is now doing the right thing.
The manager is not.
svn path=/trunk/boinc/; revision=23074
- use "sockaddr_storage" to store network addresses
(which may be IPv4 or IPv6)
rather than assuming they fit in an int.
- the entries in gui_rpc_auth.cfg may now be IPv6 addresses
(a🅱️c:e:f:g format),
or domain names of hosts that support only IPv6
Note: GUI RPCs are still constrained to use IPv4,
but this should be easy to change if it's every needed
Also: replace deprecated gethostbyname() with getaddrinfo().
svn path=/trunk/boinc/; revision=22353
favor those that are partially done
- client: fix crashing bug if a project is detached
while an RSS feed fetch for it is in progress
- code cleanup: switch from /// back to // for comments
(so much for doxygen)
svn path=/trunk/boinc/; revision=21041
The handler checks for POST headers,
and if present adds a reply header.
Also: remove the restriction that request messages
must be read in their entirety on the first recv().
I'm testing this using javascript's XMLHttpRequest.
It's not completely working;
the browser sends an OPTIONS request, then sends a POST.
The BOINC client parses and replies to these,
but for some reason the browser doesn't seem to be
parsing the POST reply.
svn path=/trunk/boinc/; revision=20774
- scheduler: fix bug in adaptive replication:
if send an unreplicated job to untrusted host,
set both wu.target_nresults and wu.min_quorum to app.target_nresults.
svn path=/trunk/boinc/; revision=15762
This prevents a DoS by sending <auth1> over and over,
filling the send buffer and eventually causing the client to block.
- Unix build: if m4 missing, check for gm4
svn path=/trunk/boinc/; revision=15282
there's a single GUI_HTTP object,
and it works only if used sequentially,
i.e. an op is started only after the previous one ends.
This breaks if a GUI RPC triggerse and op while
a project-list fetch (initiated by the client itself) is in progress.
Or if two managers are connected at the same time,
and both do HTTP ops.
The solution: have a separate GUI_HTTP object for each GUI_RPC_CONN,
and an additional one for use by the client itself.
svn path=/trunk/boinc/; revision=13692