diff --git a/checkin_notes b/checkin_notes index 5adcf8a75a..edbc10c8a1 100644 --- a/checkin_notes +++ b/checkin_notes @@ -12168,4 +12168,12 @@ Charlie 7 Dec 07 buildjpeg.sh boinc.xcodeproj/ project.pbxproj - \ No newline at end of file + +David 8 Dec 07 + - tweaked weak-auth page (from Nicolas Alvarez) + + html/ + languages/translations/ + en.po + user/ + weak_auth.php diff --git a/html/languages/translations/en.po b/html/languages/translations/en.po index 9dd0332905..881bd81dc4 100644 --- a/html/languages/translations/en.po +++ b/html/languages/translations/en.po @@ -561,3 +561,26 @@ msgstr "" msgid "unread" msgstr "" + + +######################################### +# "Weak account key" page (weak_auth.php) +######################################### + +msgid "Your 'weak account key' lets you attach computers to your account on this project, without giving the ability to log in to your account or to change it in any way." +msgstr "" + +msgid "This mechanism works only with projects that have upgraded their server software 7 Dec 2007 or later." +msgstr "" + +msgid "Your weak account key for this project is:" +msgstr "" + +msgid "To use your weak account key on a given host, find or create the 'account file' for this project. This file has a name of the form account_PROJECT_URL.xml. The account file for %1 is %2." +msgstr "" + +msgid "Create this file if needed. Set its contents to:" +msgstr "" + +msgid "Your weak account key is a function of your password. If you change your password, your weak account key changes, and your previous weak account key becomes invalid." +msgstr "" diff --git a/html/user/weak_auth.php b/html/user/weak_auth.php index 23f2733c61..d37c44ef35 100644 --- a/html/user/weak_auth.php +++ b/html/user/weak_auth.php @@ -2,43 +2,49 @@ require_once("../inc/util.inc"); +$url = parse_config(get_config(), ""); + $user = get_logged_in_user(); page_head("Weak account key"); $weak_auth = md5($user->authenticator.$user->passwd_hash); -echo " - Your 'weak account key' lets you attach computers to your account - on this project, - without giving the ability to log in to your account - or to change it in any way. - This mechanism works only with projects that have - upgraded their server software 7 Dec 2007 or later. -

- Your weak account key for this project is: -

-$weak_auth
-    
- To use your weak account key on a given host, - find or create the 'account file' for this project. - This file has a name of the form account_PROJECT_URL.xml; - for example the account file for SETI@home is - account_setiathome.berkeley.edu.xml. -

- Create this file if needed. - Set its contents to: -

-<account>
-    <master_url>PROJECT_URL</master_url>
-    <authenticator>WEAK_ACCOUNT_KEY</authenticator>
-</account>
-
-

- Your weak account key is a function of your password. - If you change your password, - your weak account key changes, - and your previous weak account key becomes invalid. -"; +//this is somewhat a rewrite of escape_url_readable from str_util.C - maybe it +//should be moved into its own function instead of inline here + +//cut off the http:// +$idx = strpos($url, '://'); +if ($idx !== FALSE) { + $url = substr($url, $idx+strlen('://')); +} +//convert invalid characters into underscores +for ($i=0; $i",tra("Your 'weak account key' lets you attach computers to your account on this project, without giving the ability to log in to your account or to change it in any way."), " ", + tra("This mechanism works only with projects that have upgraded their server software 7 Dec 2007 or later."), "

", + "

", tra("Your weak account key for this project is:"), "

", + "
$weak_auth
", + "

" , tra("To use your weak account key on a given host, find or create the 'account file' for this project. This file has a name of the form account_PROJECT_URL.xml. The account file for %1 is %2.", PROJECT, $account_file), "

", + "

", tra("Create this file if needed. Set its contents to:"), "

", + "
",
+	htmlspecialchars(
+"
+	PROJECT_URL
+	WEAK_ACCOUNT_KEY
+"),
+	"
", + "

", tra("Your weak account key is a function of your password. If you change your password, your weak account key changes, and your previous weak account key becomes invalid."), "

" +; page_tail(); ?>