[interchange-cvs] interchange - heins modified lib/Vend/Session.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Jul 5 18:04:34 EDT 2004
User: heins
Date: 2004-07-05 22:04:34 GMT
Modified: lib/Vend Session.pm
Log:
* Add a SpecialSub hook to the init_session routine.
This allows:
SpecialSub init_session check_blacklist
"check_blacklist" is a GlobalSub that scans the $CGI::remote_addr to
see if it is listed as an open proxy (or any other DNS-style
blacklist). If it is, any purchase made from that IP address is
markedly more likely to be fraudulent. A parameter ($Session-
>{blacklist}) is set, and no checkout is allowed for that session.
Revision Changes Path
2.18 +8 -2 interchange/lib/Vend/Session.pm
rev 2.18, prev_rev 2.17
Index: Session.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Session.pm,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -r2.17 -r2.18
--- Session.pm 7 Jun 2004 03:44:19 -0000 2.17
+++ Session.pm 5 Jul 2004 22:04:34 -0000 2.18
@@ -1,6 +1,6 @@
# Vend::Session - Interchange session routines
#
-# $Id: Session.pm,v 2.17 2004/06/07 03:44:19 mheins Exp $
+# $Id: Session.pm,v 2.18 2004/07/05 22:04:34 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -27,7 +27,7 @@
require Exporter;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.17 $, 10);
+$VERSION = substr(q$Revision: 2.18 $, 10);
@ISA = qw(Exporter);
@@ -496,6 +496,12 @@
tie $Vend::Items, 'Vend::Cart';
$::Values->{mv_shipmode} = $Vend::Cfg->{DefaultShipping}
if ! defined $::Values->{mv_shipmode};
+ if(my $macro = $Vend::Cfg->{SpecialSub}{init_session}) {
+ Vend::Dispatch::run_macro(
+ $macro,
+ $Vend::Session,
+ );
+ }
}
sub dump_sessions {
More information about the interchange-cvs
mailing list