Skip to content

Commit

Permalink
Fix UserDB login issues within embedded Perl by using
Browse files Browse the repository at this point in the history
Vend::Util::string_to_ref for deserialization of carts and other
hashes.
  • Loading branch information
racke committed Dec 9, 2005
1 parent 941893e commit d9bb11c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions WHATSNEW-5.5
Expand Up @@ -8,6 +8,13 @@

Interchange 5.5.1 released on YYYY-MM-DD.

Core
----

* Fix UserDB login issues within embedded Perl by using
Vend::Util::string_to_ref for deserialization of carts and other
hashes.

UserTag
-------

Expand Down
8 changes: 4 additions & 4 deletions lib/Vend/UserDB.pm
@@ -1,6 +1,6 @@
# Vend::UserDB - Interchange user database functions
#
# $Id: UserDB.pm,v 2.41 2005-11-08 18:14:45 jon Exp $
# $Id: UserDB.pm,v 2.42 2005-12-09 17:39:26 racke Exp $
#
# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
Expand All @@ -17,7 +17,7 @@

package Vend::UserDB;

$VERSION = substr(q$Revision: 2.41 $, 10);
$VERSION = substr(q$Revision: 2.42 $, 10);

use vars qw!
$VERSION
Expand Down Expand Up @@ -990,7 +990,7 @@ sub get_hash {
$s = $self->{DB}->field( $self->{USERNAME}, $field_name);

if($s) {
$self->{$name} = $ready->reval($s);
$self->{$name} = string_to_ref($s);
die errmsg("Bad structure in %s: %s", $field_name, $@) if $@;
}
else {
Expand Down Expand Up @@ -1658,7 +1658,7 @@ sub get_cart {
die errmsg("no saved carts.") . "\n" unless $s;

my @carts = split /\0/, $from;
my $d = $ready->reval($s);
my $d = string_to_ref($s);
#::logDebug ("saved carts=" . ::uneval_it($d));

die errmsg("eval failed?") unless ref $d;
Expand Down

0 comments on commit d9bb11c

Please sign in to comment.