[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Thu Sep 28 15:04:37 EDT 2017
raeburn Thu Sep 28 19:04:37 2017 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- If initialization of user session will remove an old session file,
remove the secondary session file linked to it (Apache/SSL servers).
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1294 loncom/interface/loncommon.pm:1.1295
--- loncom/interface/loncommon.pm:1.1294 Mon Aug 14 17:47:15 2017
+++ loncom/interface/loncommon.pm Thu Sep 28 19:04:37 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1294 2017/08/14 17:47:15 raeburn Exp $
+# $Id: loncommon.pm,v 1.1295 2017/09/28 19:04:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -16152,7 +16152,23 @@
opendir(DIR,$lonids);
while ($filename=readdir(DIR)) {
if ($filename=~/^$username\_\d+\_$domain\_$authhost\.id$/) {
- unlink($lonids.'/'.$filename);
+ if ($ENV{'SERVER_PORT'} == 443) {
+ my $linkedfile;
+ if (tie(my %oldenv,'GDBM_File',"$lonids/$cookie.id",
+ &GDBM_READER(),0640)) {
+ if (exists($oldenv{'user.linkedenv'})) {
+ $linkedfile = $oldenv{'user.linkedenv'};
+ }
+ untie(%oldenv);
+ }
+ if (unlink($lonids.'/'.$filename)) {
+ if ($linkedfile =~ /^[a-f0-9]+_linked\.id$/) {
+ unlink($lonids.'/'.$linkedfile);
+ }
+ }
+ } else {
+ unlink($lonids.'/'.$filename);
+ }
}
}
closedir(DIR);
More information about the LON-CAPA-cvs
mailing list