<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pario TechnoBlob &#187; MediaWiki</title>
	<atom:link href="http://pario.no/tag/mediawiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:17:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Enable secure / https SSL login on mediaWiki 1.13.3</title>
		<link>http://pario.no/2009/01/30/enable-secure-ssl-login-on-mediawiki/</link>
		<comments>http://pario.no/2009/01/30/enable-secure-ssl-login-on-mediawiki/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 16:05:22 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://pario.no/?p=953</guid>
		<description><![CDATA[This is how I&#8217;ve enabled secure SSL login through https on a mediaWiki 1.13.3 installation. This description might work on other versions of mediaWiki, but that has not been tested. mediWiki doesn&#8217;t support SSL login out of the box so a little hack has to be performed. First you need to tell the webserver, in [...]]]></description>
			<content:encoded><![CDATA[<p>This is how I&#8217;ve enabled secure SSL login through https on a mediaWiki 1.13.3 installation. This description might work on other versions of mediaWiki, but that has not been tested.<br />
mediWiki doesn&#8217;t support SSL login out of the box so a little hack has to be performed.</p>
<p>First you need to tell the webserver, in my case my Apache server that mediaWiki login requests should be redirected to the SSL page<br />
Add the following code lines to your Apache config files or the mediaWiki .htaccess file</p>
<p><strong>Rewrite login url to use httpsRewriteEngine On</strong></p>
<pre>RewriteCond %{REQUEST_URI} ^/index.php$
RewriteCond %{QUERY_STRING} ^title=Special:UserLogin
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R]</pre>
<p><strong>Rewrite non login url to use normal http</strong></p>
<pre>RewriteEngine On
RewriteCond %{QUERY_STRING} ^(?!title=Special:Userlogin)
RewriteRule ^(.*)$ http://%{SERVER_NAME}$1 [R]</pre>
<p>Source: <a href="http://wiki.epfl.ch/cfavi/mediawiki">http://wiki.epfl.ch/cfavi/mediawiki</a></p>
<p>In addition to the above configuration you have to create a PHP script to fix some cookies problems since the cookie was made on an https address but normal surfing is done on http mode.</p>
<p>Create a file named <strong>ssl_login.php</strong> and insert the following code into it</p>
<pre>
# Secure the login page.

# Secure cookies hurt us because they are set on the https page
# but inaccessible from the http page, so we lose our previous session.
$wgCookieSecure = false;

# Don't process JavaScript and CSS files.
# Otherwise, a secure page will be tagged as "partially secure" because these
# files are being hit via http.
if (checkQS('gen', 'js')) {return;}
if (checkQS('gen', 'css') || checkQS('ctype', 'text/css')) {return;}

# Get page title from query string.
$pageTitle = array_key_exists('title', $_GET)
     ? $_GET['title']
     : "";

# Get server variables
$domain = $_SERVER['HTTP_HOST'];
$uri = $_SERVER['REQUEST_URI'];

# Are we on the sign-in page or not?
# Logic works for everything except Special pages which apparently don't
# even run LocalSettings.php.
$onSignInPage = false;
$signInPageName = 'special:userlogin';  // lowercase on purpose
if ( strtolower($pageTitle) == $signInPageName ) {
  $onSignInPage = true;
} elseif ( strstr(strtolower($uri), "/$signInPageName") ) {
  $onSignInPage = true;
} else {
  $onSignInPage = false;
}

# Secure only the Special:Userlogin page.
# Un-secure all other pages.
if ( !checkServerVariable('HTTPS', 'on') &amp;&amp; $onSignInPage ) {
  header('Location: https://' . $domain . $uri);
} elseif ( checkServerVariable('HTTPS', 'on') &amp;&amp; ! $onSignInPage ) {
  header('Location: http://' . $domain . $uri);
} else {
  // nothing
}

function checkQS($key, $value) {
  return checkArrayValue($_GET, $key, $value);
}

function checkServerVariable($var, $value) {
  return checkArrayValue($_SERVER, $var, $value);
}

function checkArrayValue($arr, $key, $value) {
  return array_key_exists($key, $arr) &amp;&amp; $arr[$key] == $value;
}</pre>
<p>Include this file in your <strong>LocalSettings.php</strong> file like this</p>
<pre># Fix to use SSL login
include '/full/path/to/htdocs/ssl_login.php';</pre>
<p><strong>Source:</strong> <a href="http://www.mediawiki.org/wiki/Manual:Configuration_tips_and_tricks#HTTPS_on_Login_only">http://www.mediawiki.org/wiki/Manual:Configuration_tips_and_tricks#HTTPS_on_Login_only</a></p>
<p>Remember to restart your apache webserver to see the changes.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/wiki.epfl.ch\/cfavi\/mediawiki","http:\/\/www.mediawiki.org\/wiki\/Manual:Configuration_tips_and_tricks#HTTPS_on_Login_only"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDkvMDEvMzAvZW5hYmxlLXNlY3VyZS1zc2wtbG9naW4tb24tbWVkaWF3aWtpLzx3cHRiPkVuYWJsZSBzZWN1cmUgLyBodHRwcyBTU0wgbG9naW4gb24gbWVkaWFXaWtpIDEuMTMuMzx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2009/01/30/enable-secure-ssl-login-on-mediawiki/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>MediaWiki password reset</title>
		<link>http://pario.no/2007/09/04/mediawiki-password-reset/</link>
		<comments>http://pario.no/2007/09/04/mediawiki-password-reset/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 13:28:52 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/09/04/mediawiki-password-reset/</guid>
		<description><![CDATA[Here&#8217;s the SQL to reset the mediawiki password of a user: use mediawikidb; update tbl_user set user_password=md5(concat(user_id,'-',md5('newpassword'))) where user_name = "Alex"; The default admin username is WikiSysop, with user_id=1, so you could do: update tbl_user set user_password=md5(concat('1-',md5('newadminpassword'))) where user_id=1; Here&#8217;s how you add a new user: insert into user(user_name) values ("Alex"); then set a password [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the SQL to reset the mediawiki password of a user:</p>
<pre>
use mediawikidb;
update tbl_user set user_password=md5(concat(user_id,'-',md5('newpassword'))) where user_name = "Alex";</pre>
<p>The default admin username is WikiSysop, with user_id=1, so you could do:</p>
<pre>
update tbl_user set user_password=md5(concat('1-',md5('newadminpassword'))) where user_id=1;</pre>
<p>Here&#8217;s how you add a new user:</p>
<pre>
insert into user(user_name) values ("Alex");</pre>
<p>then set a password as above. Keep in mind that usernames must start with a capital letter.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDkvMDQvbWVkaWF3aWtpLXBhc3N3b3JkLXJlc2V0Lzx3cHRiPk1lZGlhV2lraSBwYXNzd29yZCByZXNldDx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/09/04/mediawiki-password-reset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a user in MediaWiki</title>
		<link>http://pario.no/2007/02/06/create-a-user-in-mediawiki/</link>
		<comments>http://pario.no/2007/02/06/create-a-user-in-mediawiki/#comments</comments>
		<pubDate>Tue, 06 Feb 2007 14:59:21 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/02/06/create-a-user-in-mediawiki/</guid>
		<description><![CDATA[Visit this address: /index.php?title=Special:Userlogin&#38;type=signup]]></description>
			<content:encoded><![CDATA[<p>Visit this address: <strong>/index.php?title=Special:Userlogin&amp;type=signup</strong></p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDIvMDYvY3JlYXRlLWEtdXNlci1pbi1tZWRpYXdpa2kvPHdwdGI%2BQ3JlYXRlIGEgdXNlciBpbiBNZWRpYVdpa2k8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/02/06/create-a-user-in-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom left menu/navigation menu i MediaWiki</title>
		<link>http://pario.no/2007/02/06/custom-left-menunavigation-menu-i-mediawiki/</link>
		<comments>http://pario.no/2007/02/06/custom-left-menunavigation-menu-i-mediawiki/#comments</comments>
		<pubDate>Tue, 06 Feb 2007 13:16:03 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/02/06/custom-left-menunavigation-menu-i-mediawiki/</guid>
		<description><![CDATA[To change the navigation menu you have to go to index.php?title=MediaWiki:Sidebar or ?title=MediaWiki:Sidebar and make the needed changes.]]></description>
			<content:encoded><![CDATA[<p>To change the navigation menu you have to go to <strong>index.php?title=MediaWiki:Sidebar</strong> or <strong>?title=MediaWiki:Sidebar</strong> and make the needed changes.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDIvMDYvY3VzdG9tLWxlZnQtbWVudW5hdmlnYXRpb24tbWVudS1pLW1lZGlhd2lraS88d3B0Yj5DdXN0b20gbGVmdCBtZW51L25hdmlnYXRpb24gbWVudSBpIE1lZGlhV2lraTx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/02/06/custom-left-menunavigation-menu-i-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

