switched session id generator to use guid
This commit is contained in:
parent
c23e22a3b4
commit
ae691afe94
3 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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('<script language="JavaScript" > var active="'.$u->authMethod.'"; </script>');
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue