From 32b82f96b641b62133ba336f9420ffe915074a2a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 25 Nov 2013 22:07:20 -0800 Subject: [PATCH 1/2] web: fix problem with Recaptcha display in create-account form. Also add config flag, to disable account creation via Web RPC (which is not Recaptcha-protected) --- html/user/create_account.php | 3 +++ html/user/create_account_form.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/html/user/create_account.php b/html/user/create_account.php index 20fb6905c5..47d4674d3f 100644 --- a/html/user/create_account.php +++ b/html/user/create_account.php @@ -34,6 +34,9 @@ $config = get_config(); if (parse_bool($config, "disable_account_creation")) { xml_error(-208); } +if (parse_bool($config, "disable_account_creation_rpc")) { + xml_error(-208); +} if(defined('INVITE_CODES')) { $invite_code = get_str("invite_code"); diff --git a/html/user/create_account_form.php b/html/user/create_account_form.php index c610703e97..c80746234d 100644 --- a/html/user/create_account_form.php +++ b/html/user/create_account_form.php @@ -112,7 +112,7 @@ $publickey = parse_config($config, ""); if ($publickey) { row2( tra("Please enter the words shown in the image"), - recaptcha_get_html($publickey) + recaptcha_get_html($publickey, null, true) ); } From 7f12630cd2675889e81158b3cd51d03b46d9ad46 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 25 Nov 2013 22:50:13 -0800 Subject: [PATCH 2/2] boinccmd: show daily xfers using %f to handle > 2 GB --- lib/gui_rpc_client_print.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gui_rpc_client_print.cpp b/lib/gui_rpc_client_print.cpp index ff8ce55398..49b630c5bf 100644 --- a/lib/gui_rpc_client_print.cpp +++ b/lib/gui_rpc_client_print.cpp @@ -57,8 +57,8 @@ void DAILY_XFER_HISTORY::print() { time_t t = dx.when*86400; struct tm* tm = localtime(&t); strftime(buf, sizeof(buf)-1, "%d-%b-%Y", tm); - printf("%s: %d bytes uploaded, %d bytes downloaded\n", - buf, (int)dx.up, (int)dx.down + printf("%s: %.0f bytes uploaded, %.0f bytes downloaded\n", + buf, dx.up, dx.down ); } }