diff options
author | Teravus Ovares | 2008-01-10 04:37:03 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-10 04:37:03 +0000 |
commit | a962653e04e8b1d06b36224bf20e85b3462197db (patch) | |
tree | 6e16786281d0b8384b9d80e45d78c3b6ff14a01b /OpenSim/Framework/Communications/LoginService.cs | |
parent | Fix r2959 - last letter was being sliced off region prim renames (diff) | |
download | opensim-SC-a962653e04e8b1d06b36224bf20e85b3462197db.zip opensim-SC-a962653e04e8b1d06b36224bf20e85b3462197db.tar.gz opensim-SC-a962653e04e8b1d06b36224bf20e85b3462197db.tar.bz2 opensim-SC-a962653e04e8b1d06b36224bf20e85b3462197db.tar.xz |
* After fighting with it a bit more, Opensim is now compatible with the most recent release client(RC) on the linden labs download page.
* Don't forget, you need -loginuri *and* -loginpage
* Ex: -loginpage http://10.1.1.2:8002/?method=login -loginuri http://10.1.1.2:8002/
* The ?method=login is important, don't forget to add it
* If you customize your http_loginform.html file, be sure to keep the form post address as is.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 04b8501..8317073 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -421,45 +421,44 @@ namespace OpenSim.Framework.UserManagement | |||
421 | 421 | ||
422 | if (keysvals.ContainsKey("show_login_form")) | 422 | if (keysvals.ContainsKey("show_login_form")) |
423 | { | 423 | { |
424 | if ((string)keysvals["show_login_form"] == "TRUE") | 424 | |
425 | UserProfileData user = GetTheUser(firstname, lastname); | ||
426 | bool goodweblogin = false; | ||
427 | |||
428 | if (user != null) | ||
429 | goodweblogin = AuthenticateUser(user, password); | ||
430 | |||
431 | if (goodweblogin) | ||
425 | { | 432 | { |
433 | LLUUID webloginkey = LLUUID.Random(); | ||
434 | m_userManager.StoreWebLoginKey(user.UUID, webloginkey); | ||
435 | statuscode = 301; | ||
436 | |||
437 | string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" + | ||
438 | lastname + | ||
439 | "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString()); | ||
440 | //MainLog.Instance.Verbose("WEB", "R:" + redirectURL); | ||
426 | returnactions["int_response_code"] = statuscode; | 441 | returnactions["int_response_code"] = statuscode; |
427 | returnactions["str_response_string"] = loginform; | 442 | returnactions["str_redirect_location"] = redirectURL; |
443 | returnactions["str_response_string"] = "<HTML><BODY>GoodLogin</BODY></HTML>"; | ||
428 | } | 444 | } |
429 | else | 445 | else |
430 | { | 446 | { |
431 | UserProfileData user = GetTheUser(firstname, lastname); | 447 | errormessages = "The Username and password supplied did not match our records. Check your caps lock and try again"; |
432 | bool goodweblogin = false; | ||
433 | |||
434 | if (user != null) | ||
435 | goodweblogin = AuthenticateUser(user, password); | ||
436 | 448 | ||
437 | if (goodweblogin) | 449 | loginform = GetLoginForm(firstname, lastname, location, region, grid, channel, version, lang, password, errormessages); |
438 | { | 450 | returnactions["int_response_code"] = statuscode; |
439 | LLUUID webloginkey = LLUUID.Random(); | 451 | returnactions["str_response_string"] = loginform; |
440 | m_userManager.StoreWebLoginKey(user.UUID, webloginkey); | ||
441 | statuscode = 301; | ||
442 | |||
443 | string redirectURL = "secondlife:///app/login?first_name=" + firstname + "&last_name=" + | ||
444 | lastname + | ||
445 | "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString(); | ||
446 | |||
447 | returnactions["int_response_code"] = statuscode; | ||
448 | returnactions["str_redirect_location"] = redirectURL; | ||
449 | returnactions["str_response_string"] = "<HTML><BODY>GoodLogin</BODY></HTML>"; | ||
450 | } | ||
451 | else | ||
452 | { | ||
453 | errormessages = "The Username and password supplied did not match our records. Check your caps lock and try again"; | ||
454 | |||
455 | loginform = GetLoginForm(firstname, lastname, location, region, grid, channel, version, lang, password, errormessages); | ||
456 | returnactions["int_response_code"] = statuscode; | ||
457 | returnactions["str_response_string"] = loginform; | ||
458 | |||
459 | } | ||
460 | 452 | ||
461 | } | 453 | } |
462 | 454 | ||
455 | |||
456 | |||
457 | } | ||
458 | else | ||
459 | { | ||
460 | returnactions["int_response_code"] = statuscode; | ||
461 | returnactions["str_response_string"] = loginform; | ||
463 | } | 462 | } |
464 | return returnactions; | 463 | return returnactions; |
465 | 464 | ||
@@ -511,7 +510,7 @@ namespace OpenSim.Framework.UserManagement | |||
511 | responseString = responseString + "<body><br />"; | 510 | responseString = responseString + "<body><br />"; |
512 | responseString = responseString + "<div id=\"login_box\">"; | 511 | responseString = responseString + "<div id=\"login_box\">"; |
513 | 512 | ||
514 | responseString = responseString + "<form action=\"/\" method=\"GET\" id=\"login-form\">"; | 513 | responseString = responseString + "<form action=\"/go.cgi\" method=\"GET\" id=\"login-form\">"; |
515 | 514 | ||
516 | responseString = responseString + "<div id=\"message\">[$errors]</div>"; | 515 | responseString = responseString + "<div id=\"message\">[$errors]</div>"; |
517 | responseString = responseString + "<fieldset id=\"firstname\">"; | 516 | responseString = responseString + "<fieldset id=\"firstname\">"; |