PyukiWiki CVS Commit
pyuki****@lists*****
2012年 3月 18日 (日) 01:38:46 JST
Index: PyukiWiki-Devel-UTF8/lib/setting.inc.pl diff -u PyukiWiki-Devel-UTF8/lib/setting.inc.pl:1.320 PyukiWiki-Devel-UTF8/lib/setting.inc.pl:1.321 --- PyukiWiki-Devel-UTF8/lib/setting.inc.pl:1.320 Sat Mar 17 21:48:21 2012 +++ PyukiWiki-Devel-UTF8/lib/setting.inc.pl Sun Mar 18 01:38:46 2012 @@ -1,6 +1,6 @@ ###################################################################### # setting.inc.pl - This is PyukiWiki, yet another Wiki clone. -# $Id: setting.inc.pl,v 1.320 2012/03/17 12:48:21 papu Exp $ +# $Id: setting.inc.pl,v 1.321 2012/03/17 16:38:46 papu Exp $ # # "PyukiWiki" ver 0.2.0-p3-dev1 $$ # Author: Nanami http://nanakochi.daiba.cx/ @@ -63,10 +63,10 @@ if($style!~/\//) { # my $push=$::skin_name; # comment # bug fix 0.2.0-p3 # comment - $style=~s/[\.\/]//g; - - $::skin_name=$style; - &skin_init; + if($style=~/^\w{1,64}$/) { + $::skin_name=$style; + &skin_init; + } # $::skin_name=$push; # comment } } Index: PyukiWiki-Devel-UTF8/lib/wiki.cgi diff -u PyukiWiki-Devel-UTF8/lib/wiki.cgi:1.362 PyukiWiki-Devel-UTF8/lib/wiki.cgi:1.363 --- PyukiWiki-Devel-UTF8/lib/wiki.cgi:1.362 Sun Mar 18 00:39:04 2012 +++ PyukiWiki-Devel-UTF8/lib/wiki.cgi Sun Mar 18 01:38:46 2012 @@ -1,6 +1,6 @@ ###################################################################### # wiki.cgi - This is PyukiWiki, yet another Wiki clone. -# $Id: wiki.cgi,v 1.362 2012/03/17 15:39:04 papu Exp $ +# $Id: wiki.cgi,v 1.363 2012/03/17 16:38:46 papu Exp $ # # "PyukiWiki" ver 0.2.0-p3-dev1 $$ # Copyright (C) 2004-2012 Nekyo @@ -4937,23 +4937,24 @@ if (!$_plugined{$plugin}) { # bug fix 0.2.0-p3 # comment - $plugin=~s/[\.\/]//g; - my $path = "$::plugin_dir/$plugin" . '.inc.pl'; - if (-e $path) { - require $path; - $::debug.=$@; - $_plugined{$1} = 1; # Pyuki - #v0.1.6 # comment - $path="$::res_dir/$plugin.$::lang.txt"; - %::resource = &read_resource($path,%::resource) if(-r $path); - return 1; - } else { - $path = "$::plugin_dir/$plugin" . '.pl'; + if($plugin=~/^\w{1,64}$/) { + my $path = "$::plugin_dir/$plugin" . '.inc.pl'; if (-e $path) { require $path; $::debug.=$@; - $_plugined{$1} = 2; # Yuki - return 2; + $_plugined{$1} = 1; # Pyuki + #v0.1.6 # comment + $path="$::res_dir/$plugin.$::lang.txt"; + %::resource = &read_resource($path,%::resource) if(-r $path); + return 1; + } else { + $path = "$::plugin_dir/$plugin" . '.pl'; + if (-e $path) { + require $path; + $::debug.=$@; + $_plugined{$1} = 2; # Yuki + return 2; + } } } return 0; @@ -4992,15 +4993,16 @@ if (!$_exec_plugined{$explugin}) { # bug fix 0.2.0-p3 # comment - $plugin=~s/[\.\/]//g; - my $path = "$::explugin_dir/$explugin" . '.inc.cgi'; - if (-e $path) { - require $path; - $::debug.=$@; - $_exec_plugined{$1} = 1; # Loaded # comment - $path="$::res_dir/$explugin.$::lang.txt"; - %::resource = &read_resource($path,%::resource) if(-r $path); - return 1; + if($plugin=~/^\w{1,64}$/) { + my $path = "$::explugin_dir/$explugin" . '.inc.cgi'; + if (-e $path) { + require $path; + $::debug.=$@; + $_exec_plugined{$1} = 1; # Loaded # comment + $path="$::res_dir/$explugin.$::lang.txt"; + %::resource = &read_resource($path,%::resource) if(-r $path); + return 1; + } } return 0; } @@ -5181,15 +5183,17 @@ my $mod = shift; return $mod if $::_module_loaded{$mod}++; # bug fix 0.2.0-p3 # comment - $mod=~s/[\.\/]//g; - eval qq( require $mod; ); - unless($@) { # debug - $::debug.="$mod Loaded\n" # debug - } else { # debug - $::debug.="$mod Load failed\n" # debug - } # debug - $mod=undef if($@); - return $mod; + if($mod=~/^\w{1,64}$/) { + eval qq( require $mod; ); + unless($@) { # debug + $::debug.="$mod Loaded\n" # debug + } else { # debug + $::debug.="$mod Load failed\n" # debug + } # debug + $mod=undef if($@); + return $mod; + } + return undef; } =lang ja