OSDN Git Service

BugTrack/2247 External link cushion page - Control Referer etc.
[pukiwiki/pukiwiki.git] / pukiwiki.ini.php
index abb7814..288f24c 100644 (file)
@@ -1,6 +1,10 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone
-// $Id: pukiwiki.ini.php,v 1.112 2005/03/05 14:20:11 henoheno Exp $
+// pukiwiki.ini.php
+// Copyright
+//   2002-2016 PukiWiki Development Team
+//   2001-2002 Originally written by yu-ji
+// License: GPL v2 or (at your option) any later version
 //
 // PukiWiki main setting file
 
@@ -25,18 +29,39 @@ if (! defined('PKWK_READONLY'))
 if (! defined('PKWK_SAFE_MODE'))
        define('PKWK_SAFE_MODE', 0);
 
+// PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using inline-image-tag for URIs
+//   Inline-image-tag for URIs may allow leakage of Wiki readers' information
+//   (in short, 'Web bug') or external malicious CGI (looks like an image's URL)
+//   attack to Wiki readers, but easy way to show images.
+if (! defined('PKWK_DISABLE_INLINE_IMAGE_FROM_URI'))
+       define('PKWK_DISABLE_INLINE_IMAGE_FROM_URI', 0);
+
 // PKWK_QUERY_STRING_MAX
 //   Max length of GET method, prohibits some worm attack ASAP
 //   NOTE: Keep (page-name + attach-file-name) <= PKWK_QUERY_STRING_MAX
 define('PKWK_QUERY_STRING_MAX', 640); // Bytes, 0 = OFF
 
 /////////////////////////////////////////////////
+// Experimental features
+
+// Multiline plugin hack (See BugTrack2/84)
+// EXAMPLE(with a known BUG):
+//   #plugin(args1,args2,...,argsN){{
+//   argsN+1
+//   argsN+1
+//   #memo(foo)
+//   argsN+1
+//   }}
+//   #memo(This makes '#memo(foo)' to this)
+define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled
+
+/////////////////////////////////////////////////
 // Language / Encoding settings
 
 // LANG - Internal content encoding ('en', 'ja', or ...)
 define('LANG', 'ja');
 
-// UI_LANG - Content Language for buttons, menus,  etc
+// UI_LANG - Content encoding for buttons, menus,  etc
 define('UI_LANG', LANG); // 'en' for Internationalized wikisite
 
 /////////////////////////////////////////////////
@@ -51,7 +76,6 @@ define('BACKUP_DIR',    DATA_HOME . 'backup/'   ); // Backups
 define('CACHE_DIR',     DATA_HOME . 'cache/'    ); // Some sort of caches
 define('UPLOAD_DIR',    DATA_HOME . 'attach/'   ); // Attached files and logs
 define('COUNTER_DIR',   DATA_HOME . 'counter/'  ); // Counter plugin's counts
-define('TRACKBACK_DIR', DATA_HOME . 'trackback/'); // TrackBack logs
 define('PLUGIN_DIR',    DATA_HOME . 'plugin/'   ); // Plugin directory
 
 /////////////////////////////////////////////////
@@ -84,8 +108,8 @@ default  :
 }
 
 /////////////////////////////////////////////////
-// Title of your Wikisite (Define this)
-// and also RSS feed's channel name
+// Title of your Wikisite (Name this)
+// Also used as RSS feed's channel name etc
 $page_title = 'PukiWiki';
 
 // Specify PukiWiki URL (default: auto)
@@ -120,22 +144,14 @@ $menubar      = 'MenuBar';       // Menu
 //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
 
 /////////////////////////////////////////////////
+// Always output "nofollow,noindex" attribute
 
-// PKWK_ALLOW_JAVASCRIPT - Allow using JavaScript
-define('PKWK_ALLOW_JAVASCRIPT', 0);
+$nofollow = 0; // 1 = Try hiding from search engines
 
 /////////////////////////////////////////////////
-// TrackBack feature
-
-// Enable Trackback
-$trackback = 0;
 
-// Show trackbacks with an another window
-$trackback_javascript = 0;
-
-/////////////////////////////////////////////////
-// Referer list feature
-$referer = 0;
+// PKWK_ALLOW_JAVASCRIPT - Must be 1 only for compatibility
+define('PKWK_ALLOW_JAVASCRIPT', 1);
 
 /////////////////////////////////////////////////
 // _Disable_ WikiName auto-linking
@@ -144,18 +160,30 @@ $nowikiname = 0;
 /////////////////////////////////////////////////
 // AutoLink feature
 
-// AutoLink minimum bytes (0 = Disable)
-$autolink = 8;
+// AutoLink minimum length of page name
+$autolink = 0; // Bytes, 0 = OFF (try 8)
 
 /////////////////////////////////////////////////
 // Enable Freeze / Unfreeze feature
 $function_freeze = 1;
 
 /////////////////////////////////////////////////
-// Wikisite admin password
+// Allow to use 'Do not change timestamp' checkbox
+// (0:Disable, 1:For everyone,  2:Only for the administrator)
+$notimeupdate = 1;
+
+/////////////////////////////////////////////////
+// Admin password for this Wikisite
 
-// CHANGE THIS
-$adminpass = '1a1dc91c907325c69271ddf0c944bc72'; // md5('pass')
+// Default: always fail
+$adminpass = '{x-php-md5}!';
+
+// Sample:
+//$adminpass = 'pass'; // Cleartext
+//$adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // PHP md5()  'pass'
+//$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/';   // LDAP CRYPT 'pass'
+//$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg==';               // LDAP MD5   'pass'
+//$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx';      // LDAP SMD5  'pass'
 
 /////////////////////////////////////////////////
 // Page-reading feature settings
@@ -187,40 +215,71 @@ $pagereading_config_page = ':config/PageReading';
 // Page name of default pronouncing dictionary, used when converter = 'none'
 $pagereading_config_dict = ':config/PageReading/dict';
 
+
+/////////////////////////////////////////////////
+// Authentication type
+// AUTH_TYPE_NONE, AUTH_TYPE_FORM, AUTH_TYPE_BASIC, AUTH_TYPE_EXTERNAL, ...
+// $auth_type = AUTH_TYPE_FORM;
+// $auth_external_login_url_base = './exlogin.php';
+
+/////////////////////////////////////////////////
+// LDAP
+$ldap_user_account = 0; // (0: Disabled, 1: Enabled)
+// $ldap_server = 'ldap://ldapserver:389';
+// $ldap_base_dn = 'ou=Users,dc=ldap,dc=example,dc=com';
+// $ldap_bind_dn = 'uid=$login,dc=example,dc=com';
+// $ldap_bind_password = '';
+
+/////////////////////////////////////////////////
+// User prefix that shows its auth provider
+$auth_provider_user_prefix_default = 'default:';
+$auth_provider_user_prefix_ldap = 'ldap:';
+$auth_provider_user_prefix_external = 'external:';
+$auth_provider_user_prefix_saml = 'saml:';
+
+
 /////////////////////////////////////////////////
 // User definition
 $auth_users = array(
-       'foo'   => 'foo_passwd',
-       'bar'   => 'bar_passwd',
-       'hoge'  => 'hoge_passwd',
+       // Username => password
+       'foo'   => 'foo_passwd', // Cleartext
+       'bar'   => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // PHP md5() 'bar_passwd'
+       'hoge'  => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx',      // LDAP SMD5 'hoge_passwd'
+);
+
+// Group definition
+$auth_groups = array(
+       // Groupname => group members(users)
+       'valid-user' => '', // Reserved 'valid-user' group contains all authenticated users
+       'groupfoobar'   => 'foo,bar',
 );
 
 /////////////////////////////////////////////////
 // Authentication method
 
-// 'pagename' : by Page name
-// 'contents' : by Page contents
-$auth_method_type = 'contents';
+$auth_method_type      = 'pagename';   // By Page name
+//$auth_method_type    = 'contents';   // By Page contents
 
 /////////////////////////////////////////////////
 // Read auth (0:Disable, 1:Enable)
 $read_auth = 0;
 
-// Read auth regex
 $read_auth_pages = array(
-       '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
-       '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
+       // Regex                   Groupname or Username
+       '#PageForAllValidUsers#'        => 'valid-user',
+       '#HogeHoge#'            => 'hoge',
+       '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
 );
 
 /////////////////////////////////////////////////
 // Edit auth (0:Disable, 1:Enable)
 $edit_auth = 0;
 
-// Edit auth regex
 $edit_auth_pages = array(
-       '#Bar¤Î¸ø³«Æüµ­#'       => 'bar',
-       '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
-       '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo',
+       // Regex                   Username
+       '#BarDiary#'            => 'bar',
+       '#HogeHoge#'            => 'hoge',
+       '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
 );
 
 /////////////////////////////////////////////////
@@ -230,19 +289,64 @@ $edit_auth_pages = array(
 $search_auth = 0;
 
 /////////////////////////////////////////////////
+// AutoTicketLink
+$ticket_link_sites = array(
+/*
+       array(
+               'key' => 'phpbug',
+               'type' => 'redmine', // type: redmine, jira or git
+               'title' => 'PHP :: Bug #$1',
+               'base_url' => 'https://bugs.php.net/bug.php?id=',
+       ),
+       array(
+               'key' => 'asfjira',
+               'type' => 'jira',
+               'title' => 'ASF JIRA [$1]',
+               'base_url' => 'https://issues.apache.org/jira/browse/',
+       ),
+       array(
+               'key' => 'pukiwiki-commit',
+               'type' => 'git',
+               'title' => 'PukiWiki revision $1',
+               'base_url' => 'https://ja.osdn.net/projects/pukiwiki/scm/git/pukiwiki/commits/',
+       ),
+*/
+);
+
+/////////////////////////////////////////////////
+// Show External Link Cushion Page
+// 0: Disabled
+// 1: Enabled
+$external_link_cushion_page = 0;
+$external_link_cushion = array(
+       // Wait N seconds before jumping to an external site
+       'wait_seconds' => 5,
+       // Internal site domain list
+       'internal_domains' => array(
+               'localhost',
+               // '*.example.com',
+       ),
+       // Don't show extenal link icons on these domains
+       'silent_external_domains' => array(
+               'pukiwiki.osdn.jp',
+               'pukiwiki.example.com',
+       ),
+);
+
+/////////////////////////////////////////////////
 // $whatsnew: Max number of RecentChanges
-$maxshow = 60;
+$maxshow = 500;
 
 // $whatsdeleted: Max number of RecentDeleted
 // (0 = Disabled)
-$maxshow_deleted = 60;
+$maxshow_deleted = 200;
 
 /////////////////////////////////////////////////
 // Page names can't be edit via PukiWiki
 $cantedit = array( $whatsnew, $whatsdeleted );
 
 /////////////////////////////////////////////////
-// HTTP: Send Last-Modified header
+// HTTP: Output Last-Modified header
 $lastmod = 0;
 
 /////////////////////////////////////////////////
@@ -266,22 +370,30 @@ $do_backup = 1;
 $del_backup = 0;
 
 // Bacukp interval and generation
-$cycle  = 3;    // Wait N hours between backup (0 = no wait)
+$cycle  =   3; // Wait N hours between backup (0 = no wait)
 $maxage = 120; // Stock latest N backups
 
 // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
 //          3   x   120   / 24 = 15
 
-// Spilitter of backup data (NOTE: Too dangerous to change)
+// Splitter of backup data (NOTE: Too dangerous to change)
 define('PKWK_SPLITTER', '>>>>>>>>>>');
 
 /////////////////////////////////////////////////
-// Command executed per update
-$update_exec = '';
-//$update_exec = '/usr/bin/mknmz --media-type=text/pukiwiki -O /var/lib/namazu/index/ -L ja -c -K /var/www/wiki/';
+// Command execution per update
+
+define('PKWK_UPDATE_EXEC', '');
+
+// Sample: Namazu (Search engine)
+//$target     = '/var/www/wiki/';
+//$mknmz      = '/usr/bin/mknmz';
+//$output_dir = '/var/lib/namazu/index/';
+//define('PKWK_UPDATE_EXEC',
+//     $mknmz . ' --media-type=text/pukiwiki' .
+//     ' -O ' . $output_dir . ' -L ja -c -K ' . $target);
 
 /////////////////////////////////////////////////
-// Proxy setting (for TrackBack etc)
+// HTTP proxy setting
 
 // Use HTTP proxy server to get remote data
 $use_proxy = 0;
@@ -316,6 +428,7 @@ $notify_diff_only = 1;
 // SMTP server (Windows only. Usually specified at php.ini)
 $smtp_server = 'localhost';
 
+// Mail recipient (To:) and sender (From:)
 $notify_to   = 'to@example.com';       // To:
 $notify_from = 'from@example.com';     // From:
 
@@ -323,8 +436,8 @@ $notify_from = 'from@example.com';  // From:
 $notify_subject = '[PukiWiki] $page';
 
 // Mail header
-$notify_header = "From: $notify_from\r\n" .
-       'X-Mailer: PukiWiki/' .  S_VERSION . ' PHP/' . phpversion();
+// NOTE: Multiple items must be divided by "\r\n", not "\n".
+$notify_header = '';
 
 /////////////////////////////////////////////////
 // Mail: POP / APOP Before SMTP
@@ -352,6 +465,13 @@ $non_list = '^\:';
 // Search ignored pages
 $search_non_list = 1;
 
+
+// Page redirect rules
+$page_redirect_rules = array(
+       //'#^FromProject($|(/(.+)$))#' => 'ToProject$1',
+       //'#^FromProject($|(/(.+)$))#' => function($matches) { return 'ToProject' . $matches[1]; },
+);
+
 /////////////////////////////////////////////////
 // Template setting
 
@@ -369,7 +489,7 @@ $fixed_heading_anchor = 1;
 $preformat_ltrim = 1;
 
 /////////////////////////////////////////////////
-// Convert linebreaks into <br/>
+// Convert linebreaks into <br />
 $line_break = 0;
 
 /////////////////////////////////////////////////
@@ -377,6 +497,11 @@ $line_break = 0;
 $usedatetime = 1;
 
 /////////////////////////////////////////////////
+// Logging updates (0 or 1)
+$logging_updates = 0;
+$logging_updates_log_dir = '/var/log/pukiwiki';
+
+/////////////////////////////////////////////////
 // User-Agent settings
 //
 // If you want to ignore embedded browsers for rich-content-wikisite,
@@ -416,12 +541,12 @@ $agents = array(
        array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#',  'profile'=>'keitai'), // The same?
 
        // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
-       // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c°Ê¹ß¤Ï²ÄÊÑ
-       // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()¤ÎÃæ¤Ï²ÄÊÑ
+       // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c以降は可変
+       // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()の中は可変
        array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#',      'profile'=>'keitai'),
 
        // Vodafone's embedded browser
-       // Sample: "J-PHONE/2.0/J-T03"  // 2.0¤Ï"¥Ö¥é¥¦¥¶¤Î"¥Ð¡¼¥¸¥ç¥ó
+       // Sample: "J-PHONE/2.0/J-T03"  // 2.0は"ブラウザの"バージョン
        // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
        array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#',     'profile'=>'keitai'),
 
@@ -431,7 +556,7 @@ $agents = array(
 
        // Opera, dressing up as other embedded browsers
        // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
-       array('pattern'=>'#\bDDIPOCKET\b.+\b(Opera) ([0-9\.]+)\b#',     'profile'=>'keitai'),
+       array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ([0-9\.]+)\b#', 'profile'=>'keitai'),
 
        // Planetweb http://www.planetweb.com/
        // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
@@ -479,4 +604,3 @@ $agents = array(
 
        array('pattern'=>'#^#', 'profile'=>'default'),  // Sentinel
 );
-?>