[interchange-cvs] interchange - jon modified 3 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sat Sep 13 04:28:56 UTC 2008
User: jon
Date: 2008-09-13 04:28:56 GMT
Modified: code/SystemTag set_cookie.coretag
Modified: lib/Vend Server.pm Util.pm
Log:
Support "secure cookies", which are sent only over SSL connections.
Use [set-cookie ... secure=1] to enable.
This is from a patch by Frederic Steinfels <fst at highdefinition.ch> from
2006-05-19, which fell between the cracks.
Thanks, Frederic!
Revision Changes Path
1.7 interchange/code/SystemTag/set_cookie.coretag
rev 1.7, prev_rev 1.6
Index: set_cookie.coretag
===================================================================
RCS file: /var/cvs/interchange/code/SystemTag/set_cookie.coretag,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -u -r1.6 -r1.7
--- set_cookie.coretag 30 Mar 2007 23:40:49 -0000 1.6
+++ set_cookie.coretag 13 Sep 2008 04:28:56 -0000 1.7
@@ -1,12 +1,12 @@
-# Copyright 2002-2007 Interchange Development Group and others
+# Copyright 2002-2008 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: set_cookie.coretag,v 1.6 2007-03-30 23:40:49 pajamian Exp $
+# $Id: set_cookie.coretag,v 1.7 2008-09-13 04:28:56 jon Exp $
-UserTag set-cookie Order name value expire domain path
-UserTag set-cookie Version $Revision: 1.6 $
+UserTag set-cookie Order name value expire domain path secure
+UserTag set-cookie Version $Revision: 1.7 $
UserTag set-cookie MapRoutine Vend::Util::set_cookie
2.92 interchange/lib/Vend/Server.pm
rev 2.92, prev_rev 2.91
Index: Server.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Server.pm,v
retrieving revision 2.91
retrieving revision 2.92
diff -u -u -r2.91 -r2.92
--- Server.pm 22 Apr 2008 05:09:44 -0000 2.91
+++ Server.pm 13 Sep 2008 04:28:56 -0000 2.92
@@ -1,6 +1,6 @@
# Vend::Server - Listen for Interchange CGI requests as a background server
#
-# $Id: Server.pm,v 2.91 2008-04-22 05:09:44 jon Exp $
+# $Id: Server.pm,v 2.92 2008-09-13 04:28:56 jon Exp $
#
# Copyright (C) 2002-2008 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -26,7 +26,7 @@
package Vend::Server;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.91 $, 10);
+$VERSION = substr(q$Revision: 2.92 $, 10);
use Cwd;
use POSIX qw(setsid strftime);
@@ -498,7 +498,7 @@
if defined $::Instance->{Cookies};
$out = '';
foreach my $cookie (@jar) {
- my ($name, $value, $expire, $d, $p) = @$cookie;
+ my ($name, $value, $expire, $d, $p, $secure) = @$cookie;
$d = $domain if ! $d;
$p = $path if ! $p;
#::logDebug("create_cookie: name=$name value=$value expire=$expire");
@@ -521,6 +521,7 @@
$expstring =~ s/^\s*/ /;
$out .= $expstring;
}
+ $out .= '; secure' if $secure;
$out .= "\r\n";
}
return $out;
2.119 interchange/lib/Vend/Util.pm
rev 2.119, prev_rev 2.118
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.118
retrieving revision 2.119
diff -u -u -r2.118 -r2.119
--- Util.pm 27 Mar 2008 15:56:49 -0000 2.118
+++ Util.pm 13 Sep 2008 04:28:56 -0000 2.119
@@ -1,6 +1,6 @@
# Vend::Util - Interchange utility functions
#
-# $Id: Util.pm,v 2.118 2008-03-27 15:56:49 ton Exp $
+# $Id: Util.pm,v 2.119 2008-09-13 04:28:56 jon Exp $
#
# Copyright (C) 2002-2008 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -91,7 +91,7 @@
use Vend::File;
use subs qw(logError logGlobal);
use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.118 $, 10);
+$VERSION = substr(q$Revision: 2.119 $, 10);
my $Eval_routine;
my $Eval_routine_file;
@@ -1863,7 +1863,7 @@
# Here for convenience in calls
sub set_cookie {
- my ($name, $value, $expire, $domain, $path) = @_;
+ my ($name, $value, $expire, $domain, $path, $secure) = @_;
# Set expire to now + some time if expire string is something like
# "30 days" or "7 weeks" or even "60 minutes"
@@ -1879,7 +1879,7 @@
@{$::Instance->{Cookies}} =
grep $_->[0] ne $name, @{$::Instance->{Cookies}};
}
- push @{$::Instance->{Cookies}}, [$name, $value, $expire, $domain, $path];
+ push @{$::Instance->{Cookies}}, [$name, $value, $expire, $domain, $path, $secure];
return;
}
More information about the interchange-cvs
mailing list