*{CGI::Session::driver::file::_file} = sub { my ($self,$sid) = @_; my $id = $sid; $id =~ s|\\|/|g; if ($id =~ m|/|) { return $self->set_error( "_file(): Session ids cannot contain \\ or / chars: $sid" ); } $sid =~ /^(.*)$/; $sid = $1; return File::Spec->catfile($self->{Directory}, sprintf( $FileName, $sid )); };