From 826d276602b191ee09d3450f7a8f9476c0e787b1 Mon Sep 17 00:00:00 2001 From: Klap-in Date: Tue, 21 May 2013 12:06:16 +0200 Subject: Clean internal ids in ml(), that it matches with fetch.php The resize token was broken because fetch.php cleans the id before the token calculation, while ml() uses the raw id --- _test/tests/inc/common_ml.test.php | 52 ++++++++++++++++++++++++++++++++------ inc/common.php | 7 ++++- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/_test/tests/inc/common_ml.test.php b/_test/tests/inc/common_ml.test.php index 0abfde37a..9f3d87598 100644 --- a/_test/tests/inc/common_ml.test.php +++ b/_test/tests/inc/common_ml.test.php @@ -20,8 +20,8 @@ class common_ml_test extends DokuWikiTest { $args = array('a' => 'b', 'c' => 'd', 'q' => '&ä'); - $expect = DOKU_BASE . $this->script . '?a=b&c=d&q=%26%C3%A4&media=some:'; - $this->assertEquals($expect, ml('some:', $args)); + $expect = DOKU_BASE . $this->script . '?a=b&c=d&q=%26%C3%A4&media=some:img.jpg'; + $this->assertEquals($expect, ml('some:img.jpg', $args)); } function test_ml_args_string() { @@ -31,8 +31,8 @@ class common_ml_test extends DokuWikiTest { $args = 'a=b&c=d'; - $expect = DOKU_BASE . $this->script . '?a=b&c=d&media=some:'; - $this->assertEquals($expect, ml('some:', $args)); + $expect = DOKU_BASE . $this->script . '?a=b&c=d&media=some:img.png'; + $this->assertEquals($expect, ml('some:img.png', $args)); } function test_ml_args_comma_string() { @@ -42,8 +42,8 @@ class common_ml_test extends DokuWikiTest { $args = 'a=b,c=d'; - $expect = DOKU_BASE . $this->script . '?a=b&c=d&media=some:'; - $this->assertEquals($expect, ml('some:', $args)); + $expect = DOKU_BASE . $this->script . '?a=b&c=d&media=some:img.gif'; + $this->assertEquals($expect, ml('some:img.gif', $args)); } @@ -52,7 +52,7 @@ class common_ml_test extends DokuWikiTest { $conf['useslash'] = 0; $conf['userewrite'] = 0; - $id = 'some:'; + $id = 'some:img.png'; $w = 80; $args = array('w' => $w); $tok = media_get_token($id,$w,0); @@ -66,7 +66,7 @@ class common_ml_test extends DokuWikiTest { $conf['useslash'] = 0; $conf['userewrite'] = 0; - $id = 'some:'; + $id = 'some:img.png'; $w = 80; $args = 'w='.$w; $tok = media_get_token($id,$w,0); @@ -74,4 +74,40 @@ class common_ml_test extends DokuWikiTest { $expect = DOKU_BASE . $this->script . '?w='.$w.'&tok='.$tok.'&media='.$id; $this->assertEquals($expect, ml($id, $args)); } + + function test_ml_imgresize_array_rootid() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $id = ':wiki:dokuwiki-128.png'; + $cleanid = 'wiki:dokuwiki-128.png'; + $w = 80; + $args = array('w' => $w); + $tok = media_get_token($cleanid, $w, 0); + + $expect = DOKU_BASE.$this->script.'?w='.$w.'&tok='.$tok.'&media='.$cleanid; + $this->assertEquals($expect, ml($id, $args)); + } + + function test_ml_imgresize_array_external() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $ids = array( + 'https://example.com/lib/tpl/dokuwiki/images/logo.png', + 'http://example.com/lib/tpl/dokuwiki/images/logo.png', + 'ftp://example.com/lib/tpl/dokuwiki/images/logo.png' + ); + $w = 80; + $args = array('w' => $w); + + foreach($ids as $id) { + $tok = media_get_token($id, $w, 0); + + $expect = DOKU_BASE.$this->script.'?hash='.substr(md5(auth_cookiesalt().$id), 0, 6).'&w='.$w.'&tok='.$tok.'&media='.rawurlencode($id); + $this->assertEquals($expect, ml($id, $args)); + } + } } diff --git a/inc/common.php b/inc/common.php index 4d939ac77..03236f7d4 100644 --- a/inc/common.php +++ b/inc/common.php @@ -435,6 +435,11 @@ function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = */ function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) { global $conf; + $isexternalimage = preg_match('#^(https?|ftp)://#i', $id); + if(!$isexternalimage) { + $id = cleanID($id); + } + if(is_array($more)) { // add token for resized images if($more['w'] || $more['h']){ @@ -467,7 +472,7 @@ function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) } // external URLs are always direct without rewriting - if(preg_match('#^(https?|ftp)://#i', $id)) { + if($isexternalimage) { $xlink .= 'lib/exe/fetch.php'; // add hash: $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id), 0, 6); -- cgit v1.2.3 From dcb2204bf0a8e3e25bf4ff8352a71160e846266b Mon Sep 17 00:00:00 2001 From: Klap-in Date: Tue, 21 May 2013 12:24:40 +0200 Subject: Add some tests about handling of semicolons Informative as sample implementation too --- _test/tests/inc/pageutils_clean_id.test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_test/tests/inc/pageutils_clean_id.test.php b/_test/tests/inc/pageutils_clean_id.test.php index 9c5781b24..478fd2bc4 100644 --- a/_test/tests/inc/pageutils_clean_id.test.php +++ b/_test/tests/inc/pageutils_clean_id.test.php @@ -43,6 +43,10 @@ class init_clean_id_test extends DokuWikiTest { $tests[] = array('ns._#!ns:page','false','ns._ns:page'); $tests[] = array('ns_:page',false,'ns:page'); $tests[] = array('page...page','false','page...page'); + $tests[] = array(':page',false,'page'); + $tests[] = array(':ns:page',false,'ns:page'); + $tests[] = array('page:',false,'page'); + $tests[] = array('ns:page:',false,'ns:page'); $conf['useslash'] = 0; $tests[] = array('page/page',false,'page_page'); -- cgit v1.2.3 From 6b519690e45cefe83fbef5691e372c6078c3fb9b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 27 May 2013 16:26:40 +0100 Subject: fixed broken default config options (FS#2789) --- lib/plugins/authldap/conf/default.php | 2 +- lib/plugins/authmysql/conf/default.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index d07f9c82e..d530d59c9 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -16,4 +16,4 @@ $conf['bindpw'] = ''; $conf['userscope'] = 'sub'; $conf['groupscope'] = 'sub'; $conf['groupkey'] = 'cn'; -$conf['debug'] = array('onoff'); \ No newline at end of file +$conf['debug'] = 0; \ No newline at end of file diff --git a/lib/plugins/authmysql/conf/default.php b/lib/plugins/authmysql/conf/default.php index 647f3d96c..427bea273 100644 --- a/lib/plugins/authmysql/conf/default.php +++ b/lib/plugins/authmysql/conf/default.php @@ -7,7 +7,7 @@ $conf['password'] = ''; $conf['database'] = ''; $conf['debug'] = 0; $conf['forwardClearPass'] = 0; -$conf['TablesToLock'] = ''; +$conf['TablesToLock'] = array(); $conf['checkPass'] = ''; $conf['getUserInfo'] = ''; $conf['getGroups'] = ''; -- cgit v1.2.3 From a91f1103e66d9f28375fc94de05ebbcde454950d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 27 May 2013 16:39:54 +0100 Subject: fixed wrong use of quotes in authtype warning message --- inc/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/auth.php b/inc/auth.php index 3f1f7925b..af9f35b38 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -54,7 +54,7 @@ function auth_setup() { } elseif ('auth' . $conf['authtype'] === $plugin) { // matches old auth backends (pre-Weatherwax) $auth = $plugin_controller->load('auth', $plugin); - msg('Your authtype setting is deprecated. You must set $conf[\'authtype\'] = ' . "auth" . $conf['authtype'] + msg('Your authtype setting is deprecated. You must set $conf[\'authtype\'] = "auth' . $conf['authtype'] . '"' . ' in your configuration (see Authentication Backends)',-1,'','',MSG_ADMINS_ONLY); } } -- cgit v1.2.3 From 01fb97e278338569ebf861059b81adff5f4a55c6 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 27 May 2013 17:01:43 +0100 Subject: fixed references from old mysql authtype to new mysql plugin in mysql.conf example --- conf/mysql.conf.php.example | 140 ++++++++++++++++++++--------------------- lib/plugins/authmysql/auth.php | 2 +- 2 files changed, 71 insertions(+), 71 deletions(-) diff --git a/conf/mysql.conf.php.example b/conf/mysql.conf.php.example index 94bc14e1f..c67e77c45 100644 --- a/conf/mysql.conf.php.example +++ b/conf/mysql.conf.php.example @@ -1,6 +1,6 @@ Date: Thu, 30 May 2013 16:49:58 +0200 Subject: added HMAC support to PassHash class FS#2794 --- _test/tests/inc/PassHash.test.php | 22 ++++++++++++++++++ inc/PassHash.class.php | 47 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 _test/tests/inc/PassHash.test.php diff --git a/_test/tests/inc/PassHash.test.php b/_test/tests/inc/PassHash.test.php new file mode 100644 index 000000000..b6cb07090 --- /dev/null +++ b/_test/tests/inc/PassHash.test.php @@ -0,0 +1,22 @@ +assertEquals('df08aef118f36b32e29d2f47cda649b6', PassHash::hmac('md5','data','secret')); + $this->assertEquals('9818e3306ba5ac267b5f2679fe4abd37e6cd7b54', PassHash::hmac('sha1','data','secret')); + + // known hashes from https://en.wikipedia.org/wiki/Hash-based_message_authentication_code + $this->assertEquals('74e6f7298a9c2d168935f58c001bad88', PassHash::hmac('md5','','')); + $this->assertEquals('fbdb1d1b18aa6c08324b7d64b71fb76370690e1d', PassHash::hmac('sha1','','')); + $this->assertEquals('80070713463e7749b90c2dc24911e275', PassHash::hmac('md5','The quick brown fox jumps over the lazy dog','key')); + $this->assertEquals('de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9', PassHash::hmac('sha1','The quick brown fox jumps over the lazy dog','key')); + + } +} \ No newline at end of file diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 080fb4778..61bd74939 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -494,4 +494,51 @@ class PassHash { $this->init_salt($salt, 8, false); return ':B:'.$salt.':'.md5($salt.'-'.md5($clear)); } + + /** + * Wraps around native hash_hmac() or reimplents it + * + * This is not directly used as password hashing method, and thus isn't callable via the + * verify_hash() method. It should be used to create signatures and might be used in other + * password hashing methods. + * + * @see hash_hmac() + * @author KC Cloyd + * @link http://www.php.net/manual/en/function.hash-hmac.php#93440 + * + * @param string $algo Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", + * etc..) See hash_algos() for a list of supported algorithms. + * @param string $data Message to be hashed. + * @param string $key Shared secret key used for generating the HMAC variant of the message digest. + * @param bool $raw_output When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. + * + * @return string + */ + public static function hmac($algo, $data, $key, $raw_output = false) { + // use native function if available and not in unit test + if(function_exists('hash_hmac') && !defined('SIMPLE_TEST')){ + return hash_hmac($algo, $data, $key, $raw_output); + } + + $algo = strtolower($algo); + $pack = 'H' . strlen($algo('test')); + $size = 64; + $opad = str_repeat(chr(0x5C), $size); + $ipad = str_repeat(chr(0x36), $size); + + if(strlen($key) > $size) { + $key = str_pad(pack($pack, $algo($key)), $size, chr(0x00)); + } else { + $key = str_pad($key, $size, chr(0x00)); + } + + for($i = 0; $i < strlen($key) - 1; $i++) { + $opad[$i] = $opad[$i] ^ $key[$i]; + $ipad[$i] = $ipad[$i] ^ $key[$i]; + } + + $output = $algo($opad . pack($pack, $algo($ipad . $data))); + + return ($raw_output) ? pack($pack, $output) : $output; + } } -- cgit v1.2.3 From 3c124064ad6f670d52c3678335caa57892408362 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 30 May 2013 16:56:34 +0200 Subject: use HMAC in media_token FS#2794 --- inc/media.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inc/media.php b/inc/media.php index e29a47631..18148a446 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1879,20 +1879,21 @@ function media_crop_image($file, $ext, $w, $h=0){ * cropped images have been internally generated - and prevent external * DDOS attacks via fetch * + * @author Christopher Smith + * * @param string $id id of the image * @param int $w resize/crop width * @param int $h resize/crop height - * - * @author Christopher Smith + * @return string */ function media_get_token($id,$w,$h){ // token is only required for modified images if ($w || $h) { - $token = auth_cookiesalt().$id; + $token = $id; if ($w) $token .= '.'.$w; if ($h) $token .= '.'.$h; - return substr(md5($token),0,6); + return substr(PassHash::hmac('md5', $token, auth_cookiesalt()),0,6); } return ''; -- cgit v1.2.3 From cdcd66dfc2bcf16e481d10bfa2d3ff1b4d433f99 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 31 May 2013 09:22:45 +0200 Subject: use hmac for external ressource hash FS#2794 --- inc/common.php | 2 +- inc/fetch.functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/common.php b/inc/common.php index 4d939ac77..e096d8b30 100644 --- a/inc/common.php +++ b/inc/common.php @@ -470,7 +470,7 @@ function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) if(preg_match('#^(https?|ftp)://#i', $id)) { $xlink .= 'lib/exe/fetch.php'; // add hash: - $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id), 0, 6); + $xlink .= '?hash='.substr(PassHash::hmac('md5', $id, auth_cookiesalt()), 0, 6); if($more) { $xlink .= $sep.$more; $xlink .= $sep.'media='.rawurlencode($id); diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php index 5801e96fa..ea524a37a 100644 --- a/inc/fetch.functions.php +++ b/inc/fetch.functions.php @@ -99,7 +99,7 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) { //media to local file if(preg_match('#^(https?)://#i', $media)) { //check hash - if(substr(md5(auth_cookiesalt().$media), 0, 6) !== $INPUT->str('hash')) { + if(substr(PassHash::hmac('md5', $media, auth_cookiesalt()), 0, 6) !== $INPUT->str('hash')) { return array(412, 'Precondition Failed'); } //handle external images -- cgit v1.2.3 From a132f948f22ae344760ee3da82f9f92cf0f18b7b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 31 May 2013 09:25:43 +0200 Subject: use HMAC for CSRF security tokens FS#2794 --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/common.php b/inc/common.php index e096d8b30..55c5b5ac4 100644 --- a/inc/common.php +++ b/inc/common.php @@ -56,7 +56,7 @@ function stripctl($string) { * @return string */ function getSecurityToken() { - return md5(auth_cookiesalt().session_id().$_SERVER['REMOTE_USER']); + return PassHash::hmac('md5', session_id().$_SERVER['REMOTE_USER'], auth_cookiesalt()); } /** -- cgit v1.2.3 From 8fcfc7abfd65ccd920753bee341c6bfdebcecd99 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 31 May 2013 09:29:08 +0200 Subject: use HMAC in password reset token FS#2794 --- inc/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/auth.php b/inc/auth.php index af9f35b38..dac67bcb7 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -993,7 +993,7 @@ function act_resendpwd() { } // generate auth token - $token = md5(auth_cookiesalt().$user); //secret but user based + $token = PassHash::hmac('md5', $user, auth_cookiesalt()); //secret but user based $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; $url = wl('', array('do'=> 'resendpwd', 'pwauth'=> $token), true, '&'); -- cgit v1.2.3 From 183a7b8845875e4a6b67e466cfff9f5163da3f17 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 31 May 2013 14:43:31 +0200 Subject: make password reset token completely random No need for HMAC here because there's no length attack vector here. We only care for the existance of the file and each reset request is completely (random) independent from each other. --- inc/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/auth.php b/inc/auth.php index dac67bcb7..1f8489f03 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -993,7 +993,7 @@ function act_resendpwd() { } // generate auth token - $token = PassHash::hmac('md5', $user, auth_cookiesalt()); //secret but user based + $token = md5(uniqid(mt_rand(), true)); // random secret $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; $url = wl('', array('do'=> 'resendpwd', 'pwauth'=> $token), true, '&'); -- cgit v1.2.3 From b9cf8ad44bcbbbded9d6e991f96b0d5f36310a9b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 1 Jun 2013 23:36:28 +0100 Subject: moved X-UA-Compatible from meta tag to be sent by http header instead --- lib/tpl/dokuwiki/detail.php | 2 +- lib/tpl/dokuwiki/main.php | 2 +- lib/tpl/dokuwiki/mediamanager.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index a8c5fef8a..d2ed530a3 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -9,12 +9,12 @@ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); +header('X-UA-Compatible: IE=edge,chrome=1'); ?> - <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> [<?php echo strip_tags($conf['title'])?>] diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 963750a1c..43a0c0da7 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -9,6 +9,7 @@ */ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ +header('X-UA-Compatible: IE=edge,chrome=1'); $hasSidebar = page_findnearest($conf['sidebar']); $showSidebar = $hasSidebar && ($ACT=='show'); @@ -16,7 +17,6 @@ $showSidebar = $hasSidebar && ($ACT=='show'); <html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> <head> <meta charset="utf-8" /> - <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>] diff --git a/lib/tpl/dokuwiki/mediamanager.php b/lib/tpl/dokuwiki/mediamanager.php index 23c9cee79..dadf2b10f 100644 --- a/lib/tpl/dokuwiki/mediamanager.php +++ b/lib/tpl/dokuwiki/mediamanager.php @@ -7,12 +7,12 @@ */ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); +header('X-UA-Compatible: IE=edge,chrome=1'); ?> - <?php echo hsc($lang['mediaselect'])?> [<?php echo strip_tags($conf['title'])?>] -- cgit v1.2.3 From 21c9604e66bcb42ab5267e9873738a6e22250103 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sun, 2 Jun 2013 21:48:31 +0200 Subject: we now require PHP 5.2.0 at least --- inc/infoutils.php | 4 ++-- install.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/infoutils.php b/inc/infoutils.php index 9fe5ee689..71e642995 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -107,8 +107,8 @@ function check(){ msg('DokuWiki version: '.getVersion(),1); } - if(version_compare(phpversion(),'5.1.2','<')){ - msg('Your PHP version is too old ('.phpversion().' vs. 5.1.2+ needed)',-1); + if(version_compare(phpversion(),'5.2.0','<')){ + msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1); }else{ msg('PHP version '.phpversion(),1); } diff --git a/install.php b/install.php index 24f06608d..ab0fad121 100644 --- a/install.php +++ b/install.php @@ -518,8 +518,8 @@ function check_functions(){ global $lang; $ok = true; - if(version_compare(phpversion(),'5.1.2','<')){ - $error[] = sprintf($lang['i_phpver'],phpversion(),'5.1.2'); + if(version_compare(phpversion(),'5.2.0','<')){ + $error[] = sprintf($lang['i_phpver'],phpversion(),'5.2.0'); $ok = false; } -- cgit v1.2.3 From 7482f2d6e43ea5768b2de40d89c7e7ea836a60df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EC=A7=84?= <aranet100@gmail.com> Date: Fri, 7 Jun 2013 11:30:39 +0200 Subject: Korean language update --- inc/lang/ko/draft.txt | 2 +- inc/lang/ko/lang.php | 10 +++++----- inc/lang/ko/login.txt | 2 +- inc/lang/ko/newpage.txt | 2 +- inc/lang/ko/norev.txt | 2 +- inc/lang/ko/read.txt | 2 +- inc/lang/ko/searchpage.txt | 2 +- inc/lang/ko/subscr_digest.txt | 2 +- inc/lang/ko/subscr_list.txt | 2 +- inc/lang/ko/subscr_single.txt | 2 +- lib/plugins/acl/lang/ko/lang.php | 2 +- lib/plugins/config/lang/ko/intro.txt | 2 +- lib/plugins/config/lang/ko/lang.php | 22 +++++++++++----------- lib/plugins/popularity/lang/ko/intro.txt | 2 +- lib/plugins/revert/lang/ko/lang.php | 2 +- lib/plugins/usermanager/lang/ko/lang.php | 4 ++-- 16 files changed, 31 insertions(+), 31 deletions(-) diff --git a/inc/lang/ko/draft.txt b/inc/lang/ko/draft.txt index f7787f981..b655d7c92 100644 --- a/inc/lang/ko/draft.txt +++ b/inc/lang/ko/draft.txt @@ -1,5 +1,5 @@ ====== 문서 초안 있음 ====== -이 문서의 마지막 편집 세션은 정상적으로 끝나지 않았습니다. DokuWiki는 작업 도중 자동으로 저장된 문서 초안을 사용하여 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 문서 초안을 아래에서 볼 수 있습니다. +이 문서의 마지막 편집 세션은 정상적으로 끝나지 않았습니다. DokuWiki는 작업 도중 자동으로 저장된 문서 초안을 사용해 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 문서 초안을 아래에서 볼 수 있습니다. 비정상적으로 끝난 편집 세션을 **되돌릴**지 여부를 결정하고, 자동으로 저장되었던 초안을 **삭제**하거나 편집 과정을 **취소**하세요. \ No newline at end of file diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 76d6a535d..76684659c 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -160,7 +160,7 @@ $lang['accessdenied'] = '이 문서를 볼 권한이 없습니다.'; $lang['mediausage'] = '이 파일을 참고하려면 다음 문법을 사용하세요:'; $lang['mediaview'] = '원본 파일 보기'; $lang['mediaroot'] = '루트 (root)'; -$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 선택한 파일 이름 앞에 쌍점(:)으로 구분되는 이름을 붙이면 됩니다. 파일을 드래그 앤 드롭하여 선택할 수 있습니다.'; +$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 선택한 파일 이름 앞에 쌍점(:)으로 구분되는 이름을 붙이면 됩니다. 파일을 드래그 앤 드롭해 선택할 수 있습니다.'; $lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s(으)로 바뀌었습니다!'; $lang['reference'] = '참고'; $lang['ref_inuse'] = '다음 문서에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:'; @@ -218,7 +218,7 @@ $lang['qb_hs'] = '문단 제목 선택'; $lang['qb_hplus'] = '상위 문단 제목'; $lang['qb_hminus'] = '하위 문단 제목'; $lang['qb_hequal'] = '동급 문단 제목'; -$lang['qb_link'] = '내부 링크'; +$lang['qb_link'] = '안쪽 링크'; $lang['qb_extlink'] = '바깥 링크'; $lang['qb_hr'] = '가로줄'; $lang['qb_ol'] = '순서 있는 목록'; @@ -231,7 +231,7 @@ $lang['upperns'] = '상위 이름공간으로 이동'; $lang['admin_register'] = '새 사용자 추가'; $lang['metaedit'] = '메타 데이터 편집'; $lang['metasaveerr'] = '메타 데이터 쓰기 실패'; -$lang['metasaveok'] = '메타 데이타 저장됨'; +$lang['metasaveok'] = '메타 데이터 저장됨'; $lang['img_backto'] = '뒤로'; $lang['img_title'] = '이름'; $lang['img_caption'] = '설명'; @@ -304,7 +304,7 @@ $lang['media_uploadtab'] = '올리기'; $lang['media_searchtab'] = '찾기'; $lang['media_file'] = '파일'; $lang['media_viewtab'] = '보기'; -$lang['media_edittab'] = '수정'; +$lang['media_edittab'] = '편집'; $lang['media_historytab'] = '역사'; $lang['media_list_thumbs'] = '섬네일'; $lang['media_list_rows'] = '목록'; @@ -318,7 +318,7 @@ $lang['media_view'] = '%s'; $lang['media_viewold'] = '%s (%s에 있음)'; $lang['media_edit'] = '%s 편집'; $lang['media_history'] = '%s 바뀜 내역'; -$lang['media_meta_edited'] = '메타데이터가 수정됨'; +$lang['media_meta_edited'] = '메타 데이터 편집됨'; $lang['media_perm_read'] = '이 파일을 읽을 권한이 없습니다.'; $lang['media_perm_upload'] = '파일을 올릴 권한이 없습니다.'; $lang['media_update'] = '새 판 올리기'; diff --git a/inc/lang/ko/login.txt b/inc/lang/ko/login.txt index 160b899d3..f8af4100f 100644 --- a/inc/lang/ko/login.txt +++ b/inc/lang/ko/login.txt @@ -1,3 +1,3 @@ ====== 로그인 ====== -로그인하지 않았습니다! 아래에서 로그인하세요. 로그인하려면 쿠키를 받도록 설정하여야 합니다. \ No newline at end of file +로그인하지 않았습니다! 아래에서 로그인하세요. 로그인하려면 쿠키를 활성화해야 합니다. \ No newline at end of file diff --git a/inc/lang/ko/newpage.txt b/inc/lang/ko/newpage.txt index 8db34f9cf..fa7864610 100644 --- a/inc/lang/ko/newpage.txt +++ b/inc/lang/ko/newpage.txt @@ -1,3 +1,3 @@ ====== 이 주제는 아직 없습니다 ====== -아직 없는 주제에 대한 링크를 따라왔습니다. **문서 만들기** 버튼을 클릭하여 새로 만들 수 있습니다. \ No newline at end of file +아직 없는 주제에 대한 링크를 따라왔습니다. **문서 만들기** 버튼을 클릭해 새로 만들 수 있습니다. \ No newline at end of file diff --git a/inc/lang/ko/norev.txt b/inc/lang/ko/norev.txt index 3e203b235..246f3e4f6 100644 --- a/inc/lang/ko/norev.txt +++ b/inc/lang/ko/norev.txt @@ -1,3 +1,3 @@ ====== 지정한 판 없음 ====== -지정한 판이 존재하지 않습니다. **이전 판** 버튼을 사용하여 이 문서의 이전 판 목록을 보세요. \ No newline at end of file +지정한 판이 존재하지 않습니다. **이전 판** 버튼을 사용해 이 문서의 이전 판 목록을 보세요. \ No newline at end of file diff --git a/inc/lang/ko/read.txt b/inc/lang/ko/read.txt index c510b598e..8f080fcb1 100644 --- a/inc/lang/ko/read.txt +++ b/inc/lang/ko/read.txt @@ -1 +1 @@ -이 문서는 읽기 전용입니다. 내용을 볼 수는 있지만 수정할 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. \ No newline at end of file +이 문서는 읽기 전용입니다. 내용을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. \ No newline at end of file diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt index 8cc003950..d3b37ec7c 100644 --- a/inc/lang/ko/searchpage.txt +++ b/inc/lang/ko/searchpage.txt @@ -1,5 +1,5 @@ ====== 찾기 ====== -아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 문서를 찾지 못하였다면, **문서 만들기**나 **문서 편집** 버튼을 사용하여 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다. +아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 문서를 찾지 못하였다면, **문서 만들기**나 **문서 편집** 버튼을 사용해 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다. ===== 결과 ===== \ No newline at end of file diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt index b67cc9bbc..6db7b963c 100644 --- a/inc/lang/ko/subscr_digest.txt +++ b/inc/lang/ko/subscr_digest.txt @@ -12,7 +12,7 @@ 이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤 -@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요. +@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요. -- @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt index 03ca86d2a..c13e0097a 100644 --- a/inc/lang/ko/subscr_list.txt +++ b/inc/lang/ko/subscr_list.txt @@ -8,7 +8,7 @@ -------------------------------------------------------- 이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤 -@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요. +@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요. -- @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt index 5f8b43b98..d4e38e044 100644 --- a/inc/lang/ko/subscr_single.txt +++ b/inc/lang/ko/subscr_single.txt @@ -14,7 +14,7 @@ 새 판 : @NEWPAGE@ 이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤 -@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요. +@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요. -- @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/lib/plugins/acl/lang/ko/lang.php b/lib/plugins/acl/lang/ko/lang.php index 5cec4b8fd..7c1e9a43d 100644 --- a/lib/plugins/acl/lang/ko/lang.php +++ b/lib/plugins/acl/lang/ko/lang.php @@ -40,4 +40,4 @@ $lang['acl_perm4'] = '만들기'; $lang['acl_perm8'] = '올리기'; $lang['acl_perm16'] = '삭제'; $lang['acl_new'] = '새 항목 추가'; -$lang['acl_mod'] = '선택 항목 수정'; +$lang['acl_mod'] = '항목 수정'; diff --git a/lib/plugins/config/lang/ko/intro.txt b/lib/plugins/config/lang/ko/intro.txt index a2dc7b6f6..b9eb763a4 100644 --- a/lib/plugins/config/lang/ko/intro.txt +++ b/lib/plugins/config/lang/ko/intro.txt @@ -2,6 +2,6 @@ DokuWiki 설치할 때 설정을 바꾸기 위해 사용하는 페이지입니다. 각 설정에 대한 자세한 도움말이 필요하다면 [[doku>ko:config|설정 문서 (한국어)]]와 [[doku>config|설정 문서 (영어)]]를 참고하세요. -플러그인에 대한 자세한 정보가 필요하다면 [[doku>plugin:config|플러그인 설정]] 문서를 참고하세요. 빨간 배경색으로 보이는 설정은 이 플러그인에서 바꾸지 못하도록 되어있습니다. 파란 배경색으로 보이는 설정은 기본 설정값을 가지고 있습니다. 하얀 배경색으로 보이는 설정은 특별한 설치를 위해 설정되어 있습니다. 파란색과 하얀색 배경으로 된 설정은 수정이 가능합니다. +플러그인에 대한 자세한 정보가 필요하다면 [[doku>plugin:config|플러그인 설정]] 문서를 참고하세요. 빨간 배경색으로 보이는 설정은 이 플러그인에서 바꾸지 못하도록 되어있습니다. 파란 배경색으로 보이는 설정은 기본 설정값을 가지고 있습니다. 하얀 배경색으로 보이는 설정은 특별한 설치를 위해 설정되어 있습니다. 파란색과 하얀색 배경으로 된 설정은 바꿀 수 있습니다. 이 페이지를 떠나기 전에 **저장** 버튼을 누르지 않으면 바뀐 값은 적용되지 않습니다. \ No newline at end of file diff --git a/lib/plugins/config/lang/ko/lang.php b/lib/plugins/config/lang/ko/lang.php index f69af2df6..da155bcef 100644 --- a/lib/plugins/config/lang/ko/lang.php +++ b/lib/plugins/config/lang/ko/lang.php @@ -11,14 +11,14 @@ * @author Myeongjin <aranet100@gmail.com> */ $lang['menu'] = '환경 설정'; -$lang['error'] = '잘못된 값 때문에 설정을 바꿀 수 없습니다. 수정한 값을 검토하고 확인을 누르세요. +$lang['error'] = '잘못된 값 때문에 설정을 바꿀 수 없습니다. 바뀜을 검토하고 확인을 누르세요. <br />잘못된 값은 빨간 선으로 둘러싸여 있습니다.'; $lang['updated'] = '설정이 성공적으로 바뀌었습니다.'; $lang['nochoice'] = '(다른 선택이 불가능합니다)'; -$lang['locked'] = '환경 설정 파일을 수정할 수 없습니다. 의도한 행동이 아니라면,<br /> +$lang['locked'] = '환경 설정 파일을 바꿀 수 없습니다. 의도한 행동이 아니라면,<br /> 파일 이름과 권한이 맞는지 확인하세요.'; -$lang['danger'] = '위험: 이 옵션을 잘못 수정하면 환경설정 메뉴를 사용할 수 없을 수도 있습니다.'; -$lang['warning'] = '경고: 이 옵션을 잘못 수정하면 잘못 동작할 수 있습니다.'; +$lang['danger'] = '위험: 이 옵션을 잘못 바꾸면 환경 설정 메뉴를 사용할 수 없을 수도 있습니다.'; +$lang['warning'] = '경고: 이 옵션을 잘못 바꾸면 잘못 동작할 수 있습니다.'; $lang['security'] = '보안 경고: 이 옵션은 보안에 위험이 있을 수 있습니다.'; $lang['_configuration_manager'] = '환경 설정 관리자'; $lang['_header_dokuwiki'] = 'DokuWiki 설정'; @@ -48,13 +48,13 @@ $lang['template'] = '템플릿 (위키 디자인)'; $lang['tagline'] = '태그 라인 (템플릿이 지원할 때에 한함)'; $lang['sidebar'] = '사이드바 문서 이름 (템플릿이 지원할 때에 한함), 비워두면 사이드바를 비활성화'; $lang['license'] = '콘텐츠에 어떤 라이선스를 적용하겠습니까?'; -$lang['savedir'] = '데이타 저장 디렉토리'; +$lang['savedir'] = '데이터 저장 디렉토리'; $lang['basedir'] = '서버 경로 (예를 들어 <code>/dokuwiki/</code>). 자동 감지를 하려면 비우세요.'; $lang['baseurl'] = '서버 URL (예를 들어 <code>http://www.yourserver.com</code>). 자동 감지를 하려면 비우세요.'; $lang['cookiedir'] = '쿠키 위치. 비워두면 기본 URL 위치로 지정됩니다.'; $lang['dmode'] = '디렉토리 만들기 모드'; $lang['fmode'] = '파일 만들기 모드'; -$lang['allowdebug'] = '디버그 허용 <b>필요하지 않으면 비활성화할 것!</b>'; +$lang['allowdebug'] = '디버그 허용 <b>필요하지 않으면 비활성화하세요!</b>'; $lang['recent'] = '최근 바뀐 문서당 항목 수'; $lang['recent_days'] = '최근 바뀐 문서 기준 시간 (일)'; $lang['breadcrumbs'] = '위치 "추적" 수. 0으로 설정하면 비활성화합니다.'; @@ -63,7 +63,7 @@ $lang['fullpath'] = '문서 하단에 전체 경로 보여주기'; $lang['typography'] = '기호 대체'; $lang['dformat'] = '날짜 형식 (PHP <a href="http://www.php.net/strftime">strftime</a> 기능 참고)'; $lang['signature'] = '편집기에서 서명 버튼을 누를 때 삽입할 내용'; -$lang['showuseras'] = '마지막에 문서를 수정한 사용자를 보여줄지 여부'; +$lang['showuseras'] = '마지막에 문서를 편집한 사용자를 보여줄지 여부'; $lang['toptoclevel'] = '목차 최상위 항목'; $lang['tocminheads'] = '목차 표시 여부를 결정할 최소한의 문단 제목 항목의 수'; $lang['maxtoclevel'] = '목차 최대 단계'; @@ -102,7 +102,7 @@ $lang['htmlok'] = 'HTML 내장 허용'; $lang['phpok'] = 'PHP 내장 허용'; $lang['locktime'] = '최대 파일 잠금 시간(초)'; $lang['cachetime'] = '최대 캐시 생존 시간 (초)'; -$lang['target____wiki'] = '내부 링크에 대한 타겟 창'; +$lang['target____wiki'] = '안쪽 링크에 대한 타겟 창'; $lang['target____interwiki'] = '인터위키 링크에 대한 타겟 창'; $lang['target____extern'] = '바깥 링크에 대한 타겟 창'; $lang['target____media'] = '미디어 링크에 대한 타겟 창'; @@ -133,7 +133,7 @@ $lang['userewrite'] = '멋진 URL 사용'; $lang['useslash'] = 'URL에서 이름 구분자로 슬래시 문자 사용'; $lang['sepchar'] = '문서 이름 단어 구분자'; $lang['canonical'] = '완전한 canonical URL 사용'; -$lang['fnencode'] = '아스키가 아닌 파일 이름을 인코딩 하는 방법.'; +$lang['fnencode'] = 'ASCII가 아닌 파일 이름을 인코딩 하는 방법.'; $lang['autoplural'] = '링크 연결시 복수 양식 검사'; $lang['compression'] = '첨부 파일 압축 방법 선택'; $lang['gzip_output'] = 'xhml 내용 gzip 압축 사용'; @@ -143,9 +143,9 @@ $lang['send404'] = '존재하지 않는 페이지에 대해 "HTTP $lang['broken_iua'] = '설치된 시스템에서 ignore_user_abort 기능에 문제가 있습니까? 문제가 있다면 색인이 정상적으로 동작하지 않습니다. 이 기능이 IIS+PHP/CGI에서 문제가 있는 것으로 알려졌습니다. 자세한 정보는 <a href="http://bugs.dokuwiki.org/?do=details&task_id=852">버그 852</a>를 참고하시기 바랍니다.'; $lang['xsendfile'] = '웹 서버가 정적 파일을 제공하도록 X-Sendfile 헤더를 사용하겠습니까? 웹 서버가 이 기능을 지원해야 합니다.'; $lang['renderer_xhtml'] = '주 (xhtml) 위키 출력 처리기'; -$lang['renderer__core'] = '%s (DokuWiki 내부 기능)'; +$lang['renderer__core'] = '%s (DokuWiki 내부)'; $lang['renderer__plugin'] = '%s (플러그인)'; -$lang['dnslookups'] = '이 옵션을 활성화하면 DokuWiki가 문서를 수정하는 사용자의 호스트 네임과 원격 IP 주소를 확인합니다. 서버가 느리거나, DNS를 운영하지 않거나 이 기능을 원치 않으면 비활성화하세요'; +$lang['dnslookups'] = '이 옵션을 활성화하면 DokuWiki가 문서를 편집하는 사용자의 호스트 네임과 원격 IP 주소를 확인합니다. 서버가 느리거나, DNS를 운영하지 않거나 이 기능을 원치 않으면 비활성화하세요'; $lang['proxy____host'] = '프록시 서버 이름'; $lang['proxy____port'] = '프록시 서버 포트'; $lang['proxy____user'] = '프록시 사용자 이름'; diff --git a/lib/plugins/popularity/lang/ko/intro.txt b/lib/plugins/popularity/lang/ko/intro.txt index 2513b77b4..c75c57ba5 100644 --- a/lib/plugins/popularity/lang/ko/intro.txt +++ b/lib/plugins/popularity/lang/ko/intro.txt @@ -2,7 +2,7 @@ 설치된 위키의 익명 정보를 DokuWiki 개발자에게 보냅니다. 이 [[doku>popularity|도구]]는 DokuWiki가 실제 사용자에게 어떻게 사용되는지 DokuWiki 개발자에게 알려줌으로써 이 후 개발 시 참고가 됩니다. -설치된 위키가 커짐에 따라서 이 과정을 반복할 필요가 있습니다. 반복된 데이타는 익명 ID로 구별되어집니다. +설치된 위키가 커짐에 따라서 이 과정을 반복할 필요가 있습니다. 반복된 데이터는 익명 ID로 구별되어집니다. 보내려는 데이터는 설치 DokuWiki 버전, 문서와 파일 수, 크기, 설치 플러그인, 설치 PHP 정보등을 포함하고 있습니다. diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index d36726279..f944361b8 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -16,5 +16,5 @@ $lang['reverted'] = '%s 판을 %s 판으로 되돌림'; $lang['removed'] = '%s 삭제함'; $lang['revstart'] = '되돌리기 작업을 시작합니다. 오랜 시간이 걸릴 수 있습니다. 완료되기 전에 스크립트 시간 초과가 발생한다면 더 작은 작업으로 나누어서 되돌리시기 바랍니다.'; $lang['revstop'] = '되돌리기 작업이 성공적으로 끝났습니다.'; -$lang['note1'] = '참고: 대소문자를 구별하여 찾습니다'; +$lang['note1'] = '참고: 대소문자를 구별해 찾습니다'; $lang['note2'] = '참고: 이 문서는 <i>%s</i> 스팸 단어를 포함하지 않은 최근 이전 판으로 되돌립니다. '; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index f8c400d19..57bfbc4a2 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -23,8 +23,8 @@ $lang['value'] = '값'; $lang['add'] = '추가'; $lang['delete'] = '삭제'; $lang['delete_selected'] = '선택 삭제'; -$lang['edit'] = '수정'; -$lang['edit_prompt'] = '이 사용자 수정'; +$lang['edit'] = '편집'; +$lang['edit_prompt'] = '이 사용자 편집'; $lang['modify'] = '바뀜 저장'; $lang['search'] = '찾기'; $lang['search_prompt'] = '찾기 실행'; -- cgit v1.2.3 From 12d195ab7189878b41dc4d211befafc79ae402a6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Fri, 7 Jun 2013 12:48:07 +0200 Subject: treat empty AD credentials as NULL values FS#2781 --- lib/plugins/authad/auth.php | 5 +++++ lib/plugins/authad/conf/default.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index b6b5dd268..fcbd2eeef 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -489,6 +489,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $this->cando['modPass'] = false; } + // adLDAP expects empty user/pass as NULL, we're less strict FS#2781 + if(empty($opts['admin_username'])) $opts['admin_username'] = null; + if(empty($opts['admin_password'])) $opts['admin_password'] = null; + + // user listing needs admin priviledges if(!empty($opts['admin_username']) && !empty($opts['admin_password'])) { $this->cando['getUsers'] = true; } else { diff --git a/lib/plugins/authad/conf/default.php b/lib/plugins/authad/conf/default.php index 9274db209..f71202cfc 100644 --- a/lib/plugins/authad/conf/default.php +++ b/lib/plugins/authad/conf/default.php @@ -4,8 +4,8 @@ $conf['account_suffix'] = ''; $conf['base_dn'] = ''; $conf['domain_controllers'] = ''; $conf['sso'] = 0; -$conf['admin_username'] = ''; -$conf['admin_password'] = ''; +$conf['admin_username'] = ''; +$conf['admin_password'] = ''; $conf['real_primarygroup'] = 0; $conf['use_ssl'] = 0; $conf['use_tls'] = 0; -- cgit v1.2.3 From e7fbe18945e8d94fd400fd66f36e67174951f290 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Fri, 7 Jun 2013 13:23:40 +0200 Subject: fix ldap deref option FS2798 Do not pass timelimit and deref settings to ldap_search. These values should be set globally via ldap_set_option() instead (as we do for deref). --- lib/plugins/authldap/auth.php | 8 ++++---- lib/plugins/authldap/conf/default.php | 1 + lib/plugins/authldap/conf/metadata.php | 1 + lib/plugins/authldap/lang/en/settings.php | 9 ++++++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index b49aa4792..e43c3f828 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -502,23 +502,23 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @return resource */ protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null, - $attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER) { + $attrsonly = 0, $sizelimit = 0) { if(is_null($attributes)) $attributes = array(); if($scope == 'base') { return @ldap_read( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } elseif($scope == 'one') { return @ldap_list( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } else { return @ldap_search( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } } diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index d530d59c9..2c295eeeb 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -9,6 +9,7 @@ $conf['groupfilter'] = ''; $conf['version'] = 2; $conf['starttls'] = 0; $conf['referrals'] = 0; +$conf['deref'] = 0; $conf['binddn'] = ''; $conf['bindpw'] = ''; //$conf['mapping']['name'] unsupported in config manager diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php index fc5b2e63c..a3256628c 100644 --- a/lib/plugins/authldap/conf/metadata.php +++ b/lib/plugins/authldap/conf/metadata.php @@ -8,6 +8,7 @@ $meta['groupfilter'] = array('string'); $meta['version'] = array('numeric'); $meta['starttls'] = array('onoff'); $meta['referrals'] = array('onoff'); +$meta['deref'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['binddn'] = array('string'); $meta['bindpw'] = array('password'); //$meta['mapping']['name'] unsupported in config manager diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index ddedf8ae3..e3f385f99 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -8,9 +8,16 @@ $lang['groupfilter'] = 'LDAP filter to search for groups. Eg. <code>(&(objec $lang['version'] = 'The protocol version to use. You may need to set this to <code>3</code>'; $lang['starttls'] = 'Use TLS connections?'; $lang['referrals'] = 'Shall referrals be followed?'; +$lang['deref'] = 'How to dereference aliases?'; $lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; -$lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; +$lang['groupkey'] = 'Group membership from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; $lang['debug'] = 'Display additional debug information on errors'; + + +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; \ No newline at end of file -- cgit v1.2.3 From 04e4890db370bdb57201f76581fe3dc0a3adb614 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Fri, 7 Jun 2013 13:50:46 +0200 Subject: fix problem when ldap returns no groups FS#2788 --- lib/plugins/authldap/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index e43c3f828..6a967a6d4 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -248,7 +248,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } // always add the default group to the list of groups - if(!in_array($conf['defaultgroup'], $info['grps'])) { + if(!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) { $info['grps'][] = $conf['defaultgroup']; } return $info; -- cgit v1.2.3 From 62765857f84626449d6c53b1a46c462a37e5083a Mon Sep 17 00:00:00 2001 From: Klap-in <klapinklapin@gmail.com> Date: Sun, 9 Jun 2013 21:17:20 +0200 Subject: update common_ml test for hash change --- _test/tests/inc/common_ml.test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_test/tests/inc/common_ml.test.php b/_test/tests/inc/common_ml.test.php index 9f3d87598..6f3b71db4 100644 --- a/_test/tests/inc/common_ml.test.php +++ b/_test/tests/inc/common_ml.test.php @@ -105,8 +105,9 @@ class common_ml_test extends DokuWikiTest { foreach($ids as $id) { $tok = media_get_token($id, $w, 0); + $hash = substr(PassHash::hmac('md5', $id, auth_cookiesalt()), 0, 6); - $expect = DOKU_BASE.$this->script.'?hash='.substr(md5(auth_cookiesalt().$id), 0, 6).'&w='.$w.'&tok='.$tok.'&media='.rawurlencode($id); + $expect = DOKU_BASE.$this->script.'?hash='.$hash.'&w='.$w.'&tok='.$tok.'&media='.rawurlencode($id); $this->assertEquals($expect, ml($id, $args)); } } -- cgit v1.2.3