OSDN Git Service

Added pkwk_login() to check administrator password by system
authorhenoheno <henoheno>
Sun, 18 Jul 2004 13:56:10 +0000 (22:56 +0900)
committerhenoheno <henoheno>
Sun, 18 Jul 2004 13:56:10 +0000 (22:56 +0900)
plugin/links.inc.php
plugin/rename.inc.php

index c12fd47..195ec31 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: links.inc.php,v 1.18 2004/02/29 07:45:20 arino Exp $
+// $Id: links.inc.php,v 1.19 2004/07/18 13:56:10 henoheno Exp $
 //
 
 // ¥á¥Ã¥»¡¼¥¸ÀßÄê
@@ -33,10 +33,10 @@ function plugin_links_init()
 
 function plugin_links_action()
 {
-       global $script,$post,$vars,$adminpass,$foot_explain;
+       global $script, $post, $vars, $foot_explain;
        global $_links_messages;
        
-       if (empty($vars['action']) or empty($post['adminpass']) or md5($post['adminpass']) != $adminpass)
+       if (empty($vars['action']) or empty($post['adminpass']) or ! pkwk_login($post['adminpass']))
        {
                $body = convert_html($_links_messages['msg_usage']);
                $body .= <<<EOD
index 37929a1..fe45c56 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: rename.inc.php,v 1.13 2004/07/18 13:46:22 henoheno Exp $
+// $Id: rename.inc.php,v 1.14 2004/07/18 13:51:12 henoheno Exp $
 //
 
 /*
@@ -256,7 +256,7 @@ function rename_regex($arr_from, $arr_to)
 
 function rename_phase3($pages)
 {
-       global $script, $adminpass, $_rename_messages;
+       global $script, $_rename_messages;
        
        $msg = $input = '';
        $files = rename_get_files($pages);
@@ -273,7 +273,7 @@ function rename_phase3($pages)
                }
        }
        $pass = rename_getvar('pass');
-       if (md5($pass) == $adminpass)
+       if ($pass != '' && pkwk_login($pass))
        {
                return rename_proceed($pages, $files, $exists);
        }