Commit Graph

55 Commits

Author SHA1 Message Date
Florian Schmaus 9f1d5c33ed GUI RPC: bind to INADDR_ANY if a remote host is actually configured
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.
2020-07-16 10:20:03 +02:00
David Anderson 7fa68ec0ea client: changes to GUI RPC file fetch mechanism
- 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.
2019-07-16 23:52:34 -07:00
David Anderson fee0878d0e
Merge branch 'master' into dpa_gui_rpc_get 2019-07-11 00:59:44 -07:00
David Anderson 7968058a68 Client: support HTTP GET of files over GUI RPC connections
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.
2019-07-10 21:58:03 -07:00
Juha Sointusalo 5463a4d718 client,mgr: pass on GUI name in <exchange_versions>
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.
2018-11-21 00:12:31 +02:00
David Anderson 13a5b9bf3e change multiple-inclusion guard names to BOINC_FILENAME_H 2017-04-07 23:54:49 -07:00
David Anderson e22ffeb377 GUI RPC: add support for RPCs over Unix domain sockets (for Android)
- 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
2014-01-30 22:57:44 -08:00
David Anderson 369abbd9f8 - client: if gui_rpc_auth.cfg is empty, print a warning but don't error out;
an empty GUI RPC password is allowed.
2013-03-04 17:39:23 +01:00
David Anderson 995047c74f - client: fix bug in notices where, after a notice is deleted,
the notices tab refreshes once/second forever after

svn path=/trunk/boinc/; revision=25292
2012-02-20 06:29:46 +00:00
David Anderson 9d2d540267 - client: intermediate checkin for replicated trickle-ups.
Not finished yet.
- example app: add --trickle_up and --trickle_down options,
    for testing trickle messages


svn path=/trunk/boinc/; revision=24245
2011-09-20 18:49:38 +00:00
David Anderson c61103ac26 - client: make the attributes of GUI RPCs (network, authentication)
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
2011-09-18 21:06:49 +00:00
David Anderson 36ced0a5f4 - client: increase request msg buffer size for GUI RPCs
svn path=/trunk/boinc/; revision=23486
2011-04-30 04:57:59 +00:00
Rom Walton df2829c9da Quick Updates
svn path=/trunk/boinc/; revision=23351
2011-04-06 17:57:52 +00:00
David Anderson 151ca04258 - client: more notice-related fixes.
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
2011-02-19 03:32:26 +00:00
David Anderson 0f4735352a - client: a bit of IPv6 compatibility
- 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
2010-09-15 17:41:25 +00:00
David Anderson b0cb81159f - client: when looking for new file xfers to start,
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
2010-04-01 05:54:29 +00:00
David Anderson 87a8fb1aee - client: generalize the GUI RPC mechanism to access via HTTP.
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
2010-03-02 22:52:22 +00:00
David Anderson 42683a8a31 svn path=/trunk/boinc/; revision=20269 2010-01-27 03:55:46 +00:00
David Anderson f17c0879de - changed some comments for Doxygen
svn path=/trunk/boinc/; revision=16130
2008-10-04 23:44:24 +00:00
David Anderson 63b49cd290 - client: get BOINCView to work again;
allow one auth failure before closing connection.

svn path=/trunk/boinc/; revision=15942
2008-08-26 20:49:54 +00:00
David Anderson 4f66bb4c95 - added copyright and license info to .C, .cpp, .h files
- 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
2008-08-06 18:36:30 +00:00
David Anderson 8befa29f81 - client: if GUI RPC auth error, close the socket.
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
2008-05-23 19:24:20 +00:00
Frank Thomas 3bfc78b511 Updated the postal address of the Free Software Foundation in all license headers. See http://lists.ssl.berkeley.edu/pipermail/boinc_dev/2007-October/008939.html for reference.
svn path=/trunk/boinc/; revision=13804
2007-10-09 11:35:47 +00:00
David Anderson cbe14c89fa - finished up the above
svn path=/trunk/boinc/; revision=13693
2007-09-27 21:28:32 +00:00
David Anderson aadcc979cd - client: first pass at fixing a fundamental design flaw:
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
2007-09-27 21:03:15 +00:00
David Anderson 07395c8f47 svn path=/trunk/boinc/; revision=12454 2007-04-23 20:35:55 +00:00
David Anderson d5bd5c1a79 *** empty log message ***
svn path=/trunk/boinc/; revision=12323
2007-04-05 18:17:15 +00:00
David Anderson 46695c2155 *** empty log message ***
svn path=/trunk/boinc/; revision=11683
2006-12-14 20:44:39 +00:00
David Anderson e26a45b021 *** empty log message ***
svn path=/trunk/boinc/; revision=11128
2006-09-08 22:28:10 +00:00
David Anderson 7ce1144b73 *** empty log message ***
svn path=/trunk/boinc/; revision=11076
2006-09-01 21:06:30 +00:00
David Anderson 486e704ba4 *** empty log message ***
svn path=/trunk/boinc/; revision=10654
2006-07-17 16:38:53 +00:00
David Anderson f3d1e4e71d *** empty log message ***
svn path=/trunk/boinc/; revision=9147
2005-12-25 04:53:24 +00:00
David Anderson 9b8fbcc59f *** empty log message ***
svn path=/trunk/boinc/; revision=9141
2005-12-24 06:32:07 +00:00
David Anderson b5536e8760 port 31416
svn path=/trunk/boinc/; revision=9103
2005-12-20 07:35:50 +00:00
David Anderson 9798e714c7 GUI RPC port specification
svn path=/trunk/boinc/; revision=9061
2005-12-13 08:04:57 +00:00
David Anderson a010aef22a OS/2 client version
svn path=/trunk/boinc/; revision=9022
2005-12-02 22:29:35 +00:00
Rom Walton b476e75f37 *** empty log message ***
svn path=/trunk/boinc/; revision=8937
2005-11-26 00:59:45 +00:00
David Anderson 4e02af7fb7 *** empty log message ***
svn path=/trunk/boinc/; revision=7367
2005-08-16 21:31:27 +00:00
David Anderson 66fbe0cfbe *** empty log message ***
svn path=/trunk/boinc/; revision=7360
2005-08-16 20:48:21 +00:00
David Anderson 0d2a0ad9a3 *** empty log message ***
svn path=/trunk/boinc/; revision=6778
2005-07-23 08:10:39 +00:00
David Anderson 9c07f39813 *** empty log message ***
svn path=/trunk/boinc/; revision=6292
2005-06-07 19:22:50 +00:00
David Anderson 447ff1da29 *** empty log message ***
svn path=/trunk/boinc/; revision=5816
2005-04-09 23:19:38 +00:00
David Anderson 3bc9adca43 *** empty log message ***
svn path=/trunk/boinc/; revision=5747
2005-03-30 22:38:37 +00:00
David Anderson f6f07b81c6 *** empty log message ***
svn path=/trunk/boinc/; revision=5573
2005-03-07 06:09:04 +00:00
David Anderson 435f8edd47 *** empty log message ***
svn path=/trunk/boinc/; revision=5161
2005-01-20 23:22:22 +00:00
David Anderson f8d31bf13a *** empty log message ***
svn path=/trunk/boinc/; revision=4534
2004-11-12 19:55:36 +00:00
David Anderson 37adf79297 *** empty log message ***
svn path=/trunk/boinc/; revision=4328
2004-10-14 22:01:05 +00:00
David Anderson 9a7d418eb7 *** empty log message ***
svn path=/trunk/boinc/; revision=3845
2004-07-10 07:27:00 +00:00
Eric J. Korpela 7cd5c7911a *** empty log message ***
svn path=/trunk/boinc/; revision=3725
2004-06-30 18:17:21 +00:00
David Anderson 4df39e85e4 *** empty log message ***
svn path=/trunk/boinc/; revision=3543
2004-06-12 04:45:36 +00:00