Tadashi Okoshi
slash****@users*****
2006年 7月 3日 (月) 11:02:35 JST
Index: affelio/bin/get_content.cgi
diff -u affelio/bin/get_content.cgi:1.34 affelio/bin/get_content.cgi:1.35
--- affelio/bin/get_content.cgi:1.34 Tue Mar 7 23:39:08 2006
+++ affelio/bin/get_content.cgi Mon Jul 3 11:02:35 2006
@@ -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: get_content.cgi,v 1.34 2006/03/07 14:39:08 slash5234 Exp $
+# $Id: get_content.cgi,v 1.35 2006/07/03 02:02:35 slash5234 Exp $
use strict;
use lib("../lib");
use lib("../extlib");
@@ -26,12 +26,13 @@
$exec_type = $ENV{'REDIRECT_AF_EXEC_TYPE'};
eval{
use lib("$ENV{'FARM_FS_TOP'}/$ENV{'REDIRECT_AF_EXEC_TYPE'}Farm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/PersonalFarm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/CollabFarm/lib/");
};
}else{
$exec_type = "Standalone";
}
-
my $env_cls = "Affelio::App::" . $exec_type . "::Env";
my $pub_cls = "Affelio::App::" . $exec_type . "::Public";
eval "use $env_cls;";
@@ -39,3 +40,5 @@
my $pub = new $pub_cls;
$pub->run(App=> "Bin::get_content");
+undef($pub);
+exit(1);
Index: affelio/bin/loginexec.cgi
diff -u affelio/bin/loginexec.cgi:1.18 affelio/bin/loginexec.cgi:1.19
--- affelio/bin/loginexec.cgi:1.18 Tue Mar 7 23:39:08 2006
+++ affelio/bin/loginexec.cgi Mon Jul 3 11:02:35 2006
@@ -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: loginexec.cgi,v 1.18 2006/03/07 14:39:08 slash5234 Exp $
+# $Id: loginexec.cgi,v 1.19 2006/07/03 02:02:35 slash5234 Exp $
use strict;
use lib("../lib");
use lib("../extlib");
@@ -26,6 +26,8 @@
$exec_type = $ENV{'REDIRECT_AF_EXEC_TYPE'};
eval{
use lib("$ENV{'FARM_FS_TOP'}/$ENV{'REDIRECT_AF_EXEC_TYPE'}Farm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/PersonalFarm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/CollabFarm/lib/");
};
}else{
$exec_type = "Standalone";
@@ -39,3 +41,5 @@
my $pub = new $pub_cls;
$pub->run(App=> "Bin::loginexec");
+undef($pub);
+exit(1);
Index: affelio/bin/logoutexec.cgi
diff -u affelio/bin/logoutexec.cgi:1.9 affelio/bin/logoutexec.cgi:1.10
--- affelio/bin/logoutexec.cgi:1.9 Tue Mar 7 23:39:08 2006
+++ affelio/bin/logoutexec.cgi Mon Jul 3 11:02:35 2006
@@ -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: logoutexec.cgi,v 1.9 2006/03/07 14:39:08 slash5234 Exp $
+# $Id: logoutexec.cgi,v 1.10 2006/07/03 02:02:35 slash5234 Exp $
use strict;
use lib("../lib");
use lib("../extlib");
@@ -26,6 +26,8 @@
$exec_type = $ENV{'REDIRECT_AF_EXEC_TYPE'};
eval{
use lib("$ENV{'FARM_FS_TOP'}/$ENV{'REDIRECT_AF_EXEC_TYPE'}Farm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/PersonalFarm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/CollabFarm/lib/");
};
}else{
$exec_type = "Standalone";
@@ -39,3 +41,5 @@
my $pub = new $pub_cls;
$pub->run(App=> "Bin::logoutexec");
+undef($pub);
+exit(1);
Index: affelio/bin/recv_mail_ack.cgi
diff -u affelio/bin/recv_mail_ack.cgi:1.14 affelio/bin/recv_mail_ack.cgi:1.15
--- affelio/bin/recv_mail_ack.cgi:1.14 Tue Mar 7 23:39:08 2006
+++ affelio/bin/recv_mail_ack.cgi Mon Jul 3 11:02:35 2006
@@ -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: recv_mail_ack.cgi,v 1.14 2006/03/07 14:39:08 slash5234 Exp $
+# $Id: recv_mail_ack.cgi,v 1.15 2006/07/03 02:02:35 slash5234 Exp $
use strict;
use lib("../lib");
use lib("../extlib");
@@ -26,6 +26,8 @@
$exec_type = $ENV{'REDIRECT_AF_EXEC_TYPE'};
eval{
use lib("$ENV{'FARM_FS_TOP'}/$ENV{'REDIRECT_AF_EXEC_TYPE'}Farm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/PersonalFarm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/CollabFarm/lib/");
};
}else{
$exec_type = "Standalone";
@@ -39,3 +41,5 @@
my $pub = new $pub_cls;
$pub->run(App=> "Bin::recv_mail_ack");
+undef($pub);
+exit(1);
Index: affelio/bin/send_handshake.cgi
diff -u affelio/bin/send_handshake.cgi:1.8 affelio/bin/send_handshake.cgi:removed
--- affelio/bin/send_handshake.cgi:1.8 Thu Feb 23 21:41:36 2006
+++ affelio/bin/send_handshake.cgi Mon Jul 3 11:02:35 2006
@@ -1,169 +0,0 @@
-#!/usr/bin/perl
-
-# Copyright (C) 2005 FishGrove Inc.
-#
-# 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.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# $Id: send_handshake.cgi,v 1.8 2006/02/23 12:41:36 slash5234 Exp $
-
-use strict;
-use lib("../extlib");
-use CGI qw(-unique_headers);
-$CGI::DISABLE_UPLOADS = 1;
-$CGI::POST_MAX = 102_400;
-use CGI::Session; #qw(-ip_match);
-use HTML::Template;
-use Fcntl qw( :DEFAULT :flock);
-use Crypt::DH;
-use Error qw(:try);
-
-use lib("../lib");
-use Affelio;
-use Affelio::misc::CGIError;
-use Affelio::misc::Debug;
-use Affelio::misc::Time qw(get_timestamp);
-use Affelio::misc::WebInput;
-use Affelio::SNS::Handshaker_c;
-use Affelio::SNS::Handshaker_tmpDB;
-use Affelio::exception::Exception;
-use Affelio::exception::IOException;
-
-############################################################################
-#Load Affelio
-my $cfg_dir = "../config/";
-my $af = new Affelio(ConfigDir => $cfg_dir);
-
-############################################################################
-#Sesion check (as admin)
-my $q = new CGI;
-my $sid = $q->cookie("affelio-$af->{user__nickname}");
-my $session = new CGI::Session(undef,
- $sid,
- {Directory=> $af->{site__session_dir}});
-
-my $TMPL_FILE="";
-if( (!$session) || ($session->param("type") ne "self") ){
- # Is the session alive?
- # Is the user the admin of this site?
- # if not....
- debug_print("send_handshake.cgi: login is needed.");
-
- $TMPL_FILE
- = "$af->{site__fs_root}/templates/$af->{site__template}/owner_side/login.tmpl";
- my $tmpl = new HTML::Template( filename => $TMPL_FILE,
- die_on_bad_params => 0);
- $tmpl->param(reason_msg => "You haven't been authenticated.");
- $tmpl->param("tmpl_path" => "$af->{site__web_root}/templates/$af->{site__template}/owner_side/");
- print "Content-type: text/html; charset=UTF-8\n\n";
- print $af->translate_templateL10N($tmpl->output);
- exit(1);
-}
-debug_print("send_handshake.cgi: Session as the admin is OK.");
-
-############################################################################
-#Read input
-my $target_url="";
-my $target_xml_url="";
-
-$target_url = $q->param("URL");
-if(!$target_url){
- error($q,"Target URL is not defined.");
-}
-
-######################
-#Distill valid URL
-######################
-my $wi = new Affelio::misc::WebInput;
-$target_url = $wi->PTN_URL($target_url);
-if($target_url eq ""){
- error($q,"Target URL is invalid!!");
-}
-
-######################
-#Remove "/" from the end of $target_url
-######################
-$target_url =~ s/\/$//;
-debug_print("send_HandShake: $target_url\n");
-
-###########################################
-# Get current time;
-my $cur_time = get_timestamp();
-
-
-###########################################
-#DH key generation
-my $mydh = Crypt::DH->new;
-#RFC 2412 - The OAKLEY Key Determination Protocol
-#Group 1: A 768 bit prime
-my $DH_g="2";
-my $DH_p="1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919";
-$mydh->g($DH_g);
-$mydh->p($DH_p);
-#
-#Step (1): create my public_key
-$mydh->generate_keys;
-my $my_DH_pub_key_str = $mydh->pub_key->bstr;
-my $my_DH_pri_key_str = $mydh->priv_key->bstr;
-
-debug_print("send_HandShake: pri_key = $my_DH_pri_key_str [" . length($my_DH_pri_key_str) . "]digits");
-debug_print("send_HandShake: pub_key = $my_DH_pub_key_str [" . length($my_DH_pub_key_str) . "]digits");
-
-
-###########################################
-# Send HandShake to the URL
-my $ret="";
-try{
- $ret = send_HandShake(dest_uri => $target_url,
- timestamp => $cur_time,
- my_nickname => $af->{user__nickname},
- my_AFID => $af->{site__user_afid},
- DH_pub_key_str => $my_DH_pub_key_str
- );
-}catch Affelio::exception::IOException with{
- my $E = shift;
- error($q, "<PRE>" . $E . "</PRE>");
-}catch Affelio::exception::Exception with{
- my $E = shift;
- error($q, "<PRE>" . $E . "</PRE>");
-};
-if($ret->{flerror} == 1){
- #XML-RPC communication was successful.
- #But the peer returned error. denyetc...
- error($q, "<PRE>XML-RPC peer denied RPC.</PRE>");
-}
-
-
-###########################################
-# Save peer's info into pending_DB
-my $tmpdb= new Affelio::SNS::Handshaker_tmpDB($af);
-$tmpdb->add_sent_Handshake($cur_time,
- $target_xml_url,
- "",
- $cur_time,
- $my_DH_pri_key_str);
-debug_print("send_HandShake: DB(W) $target_url => $cur_time\n");
-
-
-###########################################
-# Print output
-my $TMPL_FILE = "../templates/$af->{site__template}/owner_side/handshake_sent.tmpl";
-my $tmpl = new HTML::Template( filename => $TMPL_FILE);
-$tmpl->param(target_url => $target_url);
-$tmpl->param(mypage_url => "$af->{site__user_afid}/admin.cgi");
-$tmpl->param("tmpl_path" => "$af->{site__web_root}/templates/$af->{site__template}");
-
-print "Content-type: text/html; charset=UTF-8\n\n";
-print $af->translate_templateL10N($tmpl->output);
-
Index: affelio/bin/xml-rpc-serv.cgi
diff -u affelio/bin/xml-rpc-serv.cgi:1.4 affelio/bin/xml-rpc-serv.cgi:1.5
--- affelio/bin/xml-rpc-serv.cgi:1.4 Tue Mar 7 23:39:08 2006
+++ affelio/bin/xml-rpc-serv.cgi Mon Jul 3 11:02:35 2006
@@ -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: xml-rpc-serv.cgi,v 1.4 2006/03/07 14:39:08 slash5234 Exp $
+# $Id: xml-rpc-serv.cgi,v 1.5 2006/07/03 02:02:35 slash5234 Exp $
use strict;
use lib("../lib");
use lib("../extlib");
@@ -26,6 +26,8 @@
$exec_type = $ENV{'REDIRECT_AF_EXEC_TYPE'};
eval{
use lib("$ENV{'FARM_FS_TOP'}/$ENV{'REDIRECT_AF_EXEC_TYPE'}Farm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/PersonalFarm/lib/");
+ use lib("$ENV{'FARM_FS_TOP'}/CollabFarm/lib/");
};
}else{
$exec_type = "Standalone";
@@ -39,3 +41,5 @@
my $pub = new $pub_cls;
$pub->run(App=> "Bin::xml_rpc_serv");
+undef($pub);
+exit(1);