From 988975abea3a79a65f2f9cf41c0d6be25f0c1830 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 2 May 2006 23:32:52 +0000 Subject: [PATCH] fixed a problem where id generator could generate hex and binary looking patterns --- lib/WebGUI/Session/Id.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/WebGUI/Session/Id.pm b/lib/WebGUI/Session/Id.pm index 73140db86..46b89d3a7 100644 --- a/lib/WebGUI/Session/Id.pm +++ b/lib/WebGUI/Session/Id.pm @@ -70,6 +70,9 @@ sub generate { my $id = Digest::MD5::md5_base64($v); $id =~ s/\+/_/g; $id =~ s/\//-/g; + if ($id =~ /^0/) { # Can't start with 0 because that can cause problems with 0x (hex) and 0b (bin) in perl + $id = $self->generate(); + } return $id; }