Tadashi Okoshi
slash****@users*****
2005年 12月 18日 (日) 14:26:54 JST
Index: affelio/incoming.cgi
diff -u affelio/incoming.cgi:1.14 affelio/incoming.cgi:1.15
--- affelio/incoming.cgi:1.14 Sun Dec 18 12:32:51 2005
+++ affelio/incoming.cgi Sun Dec 18 14:26:54 2005
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: incoming.cgi,v 1.14 2005/12/18 03:32:51 slash5234 Exp $
+# $Id: incoming.cgi,v 1.15 2005/12/18 05:26:54 slash5234 Exp $
use strict;
@@ -56,6 +56,11 @@
$session = new CGI::Session(undef,
$sid,
{Directory=> $af->{site__session_dir}});
+ if( $sid != $session->id ){
+ debug_print("incoming.cgi: session deleted.");
+ $session->delete();
+ undef($session);
+ }
}
############################################################################
Index: affelio/outgoing.cgi
diff -u affelio/outgoing.cgi:1.11 affelio/outgoing.cgi:1.12
--- affelio/outgoing.cgi:1.11 Sat Dec 17 12:02:06 2005
+++ affelio/outgoing.cgi Sun Dec 18 14:26:54 2005
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# $Id: outgoing.cgi,v 1.11 2005/12/17 03:02:06 slash5234 Exp $
+# $Id: outgoing.cgi,v 1.12 2005/12/18 05:26:54 slash5234 Exp $
use strict;
@@ -57,6 +57,11 @@
my $session = new CGI::Session(undef,
$sid,
{Directory=> $af->{site__session_dir}});
+if( $sid != $session->id ){
+ debug_print("outgoing.cgi: session deleted.");
+ $session->delete();
+ undef($session);
+}
my $visitor_type="pb";
my $visitor_nickname="anonymous";
Index: affelio/index.cgi
diff -u affelio/index.cgi:1.28 affelio/index.cgi:1.29
--- affelio/index.cgi:1.28 Sat Dec 17 04:57:47 2005
+++ affelio/index.cgi Sun Dec 18 14:26:54 2005
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: index.cgi,v 1.28 2005/12/16 19:57:47 slash5234 Exp $
+# $Id: index.cgi,v 1.29 2005/12/18 05:26:54 slash5234 Exp $
use strict;
@@ -54,13 +54,20 @@
############################################################################
#Check session w/ cookie
############################################################################
-my $sid = $q->cookie("affelio-$af->{user__nickname}");
-debug_print("index.cgi: sid from cookie = $sid");
+my $given_sid = $q->cookie("affelio-$af->{user__nickname}");
+debug_print("index.cgi: sid from cookie = $given_sid");
my $session;
-if($sid){
+if($given_sid ne ""){
$session = new CGI::Session(undef,
- $sid,
+ $given_sid,
{Directory=> $af->{site__session_dir}});
+ debug_print("index.cgi: startup sid given=[" . $given_sid . "]");
+ debug_print("index.cgi: startup sid new =[" . $session->id . "]");
+ if( $given_sid != $session->id ){
+ debug_print("index.cgi: session deleted.");
+ $session->delete();
+ undef($session);
+ }
}
my $visitor_type="pb";