From ae691afe9464c602416318d51eabb79102990823 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 1 Apr 2005 19:12:56 +0000 Subject: [PATCH] switched session id generator to use guid --- docs/changelog/6.x.x.txt | 3 +++ lib/WebGUI/Operation/User.pm | 1 + lib/WebGUI/Session.pm | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index f93c7c32f..c5291e85e 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -9,6 +9,9 @@ - Whitespace in URLs will now be replaced with hyphens (-) instead of underscores (_) because there is some evidence that hyphens get better search index ranking than underscores. + - Turned off autocomplete on user manager. + - Switched session ID generator to use WebGUI::Id::generate() the same as + everything else. 6.5.5 diff --git a/lib/WebGUI/Operation/User.pm b/lib/WebGUI/Operation/User.pm index 44fa2d50f..9d28a0af2 100644 --- a/lib/WebGUI/Operation/User.pm +++ b/lib/WebGUI/Operation/User.pm @@ -217,6 +217,7 @@ sub www_editUser { "groups"=> { label=>$i18n->get('89')}, ); my $tabform = WebGUI::TabForm->new(\%tabs); + $tabform->formHeader({extras=>'autocomplete="off"'}); my $u = WebGUI::User->new(($session{form}{uid} eq 'new') ? '' : $session{form}{uid}); WebGUI::Style::setScript($session{config}{extrasURL}."/swapLayers.js", {language=>"JavaScript"}); $tabform->getTab("account")->raw(''); diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 6987bdfa4..a4684ea94 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -23,6 +23,7 @@ use strict; use Tie::CPHash; use WebGUI::Config; use WebGUI::ErrorHandler; +use WebGUI::Id; use WebGUI::SQL; use WebGUI::Utility; use URI::Escape; @@ -136,7 +137,7 @@ sub _time { #------------------------------------------------------------------- # This routine returns an unique session Id. sub _uniqueSessionId { - my $sessionId = crypt((_time()*rand(1000)),rand(99)); + my $sessionId = WebGUI::Id::generate(); my ($isDuplicate) = WebGUI::SQL->buildArray("select count(*) from userSession where sessionId =".quote($sessionId)); if ($isDuplicate) { return _uniqueSessionId();