diff --git a/checkin_notes b/checkin_notes
index 8094ebe84c..c3a4d00035 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -25599,3 +25599,14 @@ David 7 Mar 2005
lib/
Makefile.am
network.C,h
+
+David 7 Mar 2005
+ - Bug fixes in GUI RPC protection.
+ It works now using boinc_cmd.
+ (need to integrate in BOINC manager)
+
+ client/
+ gui_rpc_server.C
+ lib/
+ boinc_cmd.C
+ gui_rpc_client.C
diff --git a/client/gui_rpc_server.C b/client/gui_rpc_server.C
index 2ab0023cf3..d0593e3dba 100644
--- a/client/gui_rpc_server.C
+++ b/client/gui_rpc_server.C
@@ -474,6 +474,7 @@ void GUI_RPC_CONN::handle_auth2(char* buf, MIOFILE& fout) {
return;
}
fout.printf("\n");
+ auth_needed = false;
}
int GUI_RPC_CONN::handle_rpc() {
@@ -510,9 +511,9 @@ int GUI_RPC_CONN::handle_rpc() {
"%d\n",
gstate.version()
);
- if (match_tag(request_msg, "")) {
+ if (match_tag(request_msg, "")) {
+ } else if (match_tag(request_msg, "%s\n", nonce_hash);
- retval = rpc.do_rpc("\n");
+ sprintf(buf, "\n%s\n", nonce_hash);
+ retval = rpc.do_rpc(buf);
if (retval) return retval;
while (rpc.fin.fgets(buf, 256)) {
if (match_tag(buf, "")) {
@@ -1058,11 +1060,17 @@ int RPC::do_rpc(const char* req) {
int retval;
if (rpc_client->sock == 0) return ERR_CONNECT;
+#ifdef DEBUG
+ puts(req);
+#endif
retval = rpc_client->send_request(req);
if (retval) return retval;
retval = rpc_client->get_reply(mbuf);
if (retval) return retval;
fin.init_buf(mbuf);
+#ifdef DEBUG
+ puts(mbuf);
+#endif
return 0;
}
@@ -1079,6 +1087,9 @@ int RPC_CLIENT::get_state(CC_STATE& state) {
if (retval) return retval;
while (rpc.fin.fgets(buf, 256)) {
+ if (match_tag(buf, "")) break;
else if (parse_int(buf, "", client_version)) continue;
else if (match_tag(buf, "")) {