<?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"
	>

<channel>
	<title>PunBB DevBlog</title>
	<atom:link href="http://blog.punbb.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.punbb.org</link>
	<description>Straight from the horse's mouth</description>
	<pubDate>Thu, 14 Feb 2008 04:13:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6-bleeding</generator>
	<language>en</language>
			<item>
		<title>PunBB Resource and 1.3</title>
		<link>http://blog.punbb.org/2008/02/13/punbb-resource-and-13/</link>
		<comments>http://blog.punbb.org/2008/02/13/punbb-resource-and-13/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 16:16:40 +0000</pubDate>
		<dc:creator>Kristoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/?p=16</guid>
		<description><![CDATA[Kris here, and I&#8217;m gonna talk some about the adaption of 1.3 over at the PunBB Resource. Please note that PunRes is not maintained by the PunBB dev team or it&#8217;s copyright holders, but by me and a few dedicated moderators.
Ever since the extension system in 1.3 was announced, people have been asking questions about [...]]]></description>
			<content:encoded><![CDATA[<p>Kris here, and I&#8217;m gonna talk some about the adaption of 1.3 over at the PunBB Resource. Please note that PunRes is not maintained by the PunBB dev team or it&#8217;s copyright holders, but by me and a few dedicated moderators.</p>
<p>Ever since the extension system in 1.3 was announced, people have been asking questions about PunRes and future development of the site. I think it&#8217;s due time to announce some of the features and ideas I have for the next generation of PunBB&#8217;s mod community. Before PunRes was aimed at the sole mod developer writing the actual code. Now, when the extensions and styles have taken a more centralized role of the PunBB community, this is no longer the case.<br />
<span id="more-16"></span><br />
PunRes will no longer be a forum where developer can get together and discuss how to hack up the PunBB code in different ways. This has always been a problem as the same discussions have been going on over at the official boards. PunRes will instead compensate for what the official board will not do, that is to host extensions and styles. Some degree of communication will be available, but it will be on the extension level, not on a global PunBB source level.</p>
<p>PunRes will make it easy for developers to organize their extensions and styles, and it will be just as easy for a board administrator to find the information they need. Here are some practical features that will most likely be in the next version of PunRes:</p>
<p>- Completely revamped interface with improved search and category implementation. This will also be accompanied with RSS listings for new releases, community news etc.</p>
<p>- Better recognition of well-written extensions. Every release will be moderated by trusted people in the community or otherwise labeled in some way that will tell the end-user that it is a safe extension to use. The moderation will take notice of security, compatibility (both database and other extensions), user-interface, coding standard and code effectiveness.</p>
<p>- The style previewer will be enhanced and styles will also be moderated before release to ensure end-user safety.</p>
<p>- Keep your board up-to-date by querying the PunRes database directly from your own board&#8217;s interface. Basically, you will have a list of your installed extensions and the interface will tell you whether or not there is a newer version released.</p>
<p>- You will be able to automatically post a release through the interface of PunXS (http://www.punxs.org/ for more info).</p>
<p>- Improved board statistics and removed public listings. An administrator will be able to use the graphs from PunRes on his/her own board, but PunRes won&#8217;t list most popular/active boards. This feature will simply exist as a tool for administrators to keep track of their board&#8217;s activity.</p>
<p>These are just some of the most significant changes, many good ideas posted in the PunRes feedback forum will also make it in. I&#8217;ve deliberately left anything related to the wiki out of here, as we&#8217;ve yet to see what road the official wiki will take.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2008/02/13/punbb-resource-and-13/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PunBB 1.3 beta released!</title>
		<link>http://blog.punbb.org/2008/01/30/15/</link>
		<comments>http://blog.punbb.org/2008/01/30/15/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 16:41:43 +0000</pubDate>
		<dc:creator>Neal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/?p=15</guid>
		<description><![CDATA[This is a repost of Rickard&#8217;s 1.3 beta announcement, just because this event is blog post worthy :-)

I just exported, zipped and uploaded revision 1400 of the 1.3 tree to the download folder. That&#8217;s right, ladies and gentlemen, it&#8217;s time for bug crunching! Download PunBB 1.3 Beta.
Here are a few notes of interest to all [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is a repost of Rickard&#8217;s 1.3 beta announcement, just because this event is blog post worthy :-)</em></p>
<blockquote><p>
I just exported, zipped and uploaded revision 1400 of the 1.3 tree to the download folder. That&#8217;s right, ladies and gentlemen, it&#8217;s time for bug crunching! Download PunBB 1.3 Beta.</p>
<p>Here are a few notes of interest to all potential beta testers:<br />
<span id="more-15"></span><br />
1. This is a beta (and not in the Google sense of the word), so don&#8217;t expect everything to work perfectly. There are bugs. Don&#8217;t replace your production server install with this just yet.</p>
<p>2. The documentation is a bit lacking at the moment (which in turn is a bit of an understatement :D). An overhauled version of the 1.2 documentation is in the pipeline. Included in this, among other things, is a short manual aimed at extension developers.</p>
<p>3. Speaking of extensions, please dig into and tinker with the extension system. We appreciate any comments, thoughts or ideas you have on the subject. In particular, we are interested in requests for new hooks. We are aware that, even though the code currently contains a great number of hooks, there is need for more.</p>
<p>4. Another area of interest is the greatly improved update script. In PunBB 1.3, we are aiming for full UTF-8 compatibility. In order to accommodate this, the update script now does character set conversion to make sure as much as possible of existing content can be transferred over into valid UTF-8. This process is quite complex and the number of variations of characters sets out there is more or less infinite. Please put the update script through its paces. In order to realize proper UTF-8 support, we had to bump the MySQL requirement to 4.1.2. Hopefully, this shouldn&#8217;t affect too many of you.</p>
<p>5. As you might have realized, virtually every line of code and markup has been affected by the move to 1.3. What this means is that existing language packs are useless in 1.3. When the time comes for 1.3 final, it would be great to have a few additional languages available for download on the website. We would however appreciate if you could give us a few more days to tidy up some of the language files before you start. The new admin language file in particular, is a mess at the moment.</p>
<p>I think that about covers it for now. Please try to keep all discussions relating to the beta in the new 1.3 Beta talk.</p>
<p>Enjoy!
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2008/01/30/15/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The hotfix system</title>
		<link>http://blog.punbb.org/2007/10/22/the-hotfix-system/</link>
		<comments>http://blog.punbb.org/2007/10/22/the-hotfix-system/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 07:33:27 +0000</pubDate>
		<dc:creator>Rickard</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/10/22/the-hotfix-system/</guid>
		<description><![CDATA[As some of you might have noticed, I committed some code yesterday that deals with automatically checking for updates. The commit message also speaks of the &#8220;hotfix extension system&#8221;. So, what the hell is that then?

As the extension system was taking shape, we had an idea about fixing bugs using extensions. There&#8217;s nothing that prevents [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you might have noticed, I <a href="http://dev.punbb.org/changeset/1069">committed some code</a> yesterday that deals with automatically checking for updates. The commit message also speaks of the &#8220;hotfix extension system&#8221;. So, what the hell is that then?<br />
<span id="more-13"></span><br />
As the extension system was taking shape, we had an idea about fixing bugs using extensions. There&#8217;s nothing that prevents an extension from fixing a problem as opposed to just adding new functionality. So we came up with the idea of hotfix extensions. If we discover an issue in PunBB 1.3.*, we will have the option of releasing a hotfix extension instead of releasing a new version, provided the issue can be dealt with as an extension (there are certain exceptions). Some of the advantages to this are:</p>
<ul>
<li>Speed. Distributing a hotfix for a straight-up XSS or SQL injection vulnerability is a lot easier than packaging up a brand new release.</li>
<li>Security. The faster we can fix something and the faster this fix can be applied to as many installs as possible, the better.</li>
<li>Convenience. Installing a hotfix is ridiculously easy. PunBB tells you when there&#8217;s a new one and then you go to admin/extensions and click install.</li>
</ul>
<p>Every once in a while, we will release a new version that incorporates the hotfixes that have been released for previous versions. The database update script will then automatically uninstall any hotfixes it supercedes.</p>
<p>Another cool thing is that since hotfixes are tied to a specific PunBB version, that means we can support an older version through hotfixes even when there are newer versions available. Someone might download PunBB 1.3.1, hack it to pieces and then be hesitant to upgrade to 1.3.3.</p>
<p>There&#8217;s still some work left on the extension system as a whole (more hooks as well as some minor additions to the manifest standard), but things are shaping up nicely.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/10/22/the-hotfix-system/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Preventing CSRF attacks</title>
		<link>http://blog.punbb.org/2007/09/18/preventing-csrf-attacks/</link>
		<comments>http://blog.punbb.org/2007/09/18/preventing-csrf-attacks/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 21:35:16 +0000</pubDate>
		<dc:creator>Rickard</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/09/18/preventing-csrf-attacks/</guid>
		<description><![CDATA[Users of PunBB 1.2 and earlier versions are familiar with the infamous referrer check. The referrer check, although fully functional, has caused many administrators and moderators quite a lot of grief. It&#8217;s confusing and intrusive.

What the referrer check does is to make sure that any GET or POST data that is submitted to PunBB actually [...]]]></description>
			<content:encoded><![CDATA[<p>Users of PunBB 1.2 and earlier versions are familiar with the infamous referrer check. The referrer check, although fully functional, has caused many administrators and moderators quite a lot of grief. It&#8217;s confusing and intrusive.<br />
<span id="more-12"></span><br />
What the referrer check does is to make sure that any GET or POST data that is submitted to PunBB actually originates from one of PunBB&#8217;s scripts. It does this by comparing the value of the HTTP_REFERER header (misspelled in the spec) to the expected value (e.g. http://punbb.org/forums/delete.php). The HTTP_REFERER header is sent by all browsers when it is referred from one page to another and contains the URL of the referring page. Why does this matter? Well, consider this scenario.</p>
<p>An administrator of a PunBB forum clicks a link to an external page posted by a malicious user. On this external page, the malicious user has constructed a hidden form that automatically submits when anyone visits the page. The form submits to the profile.php script of the administrators PunBB install with the parameter update_group_membership, the user ID of the malicious user and the destination group - administrators. The administrator doesn&#8217;t even noticed that the form submits in the background and boom, the hacker has managed to escalate himself to administrator. He then logs in, deletes everything and posts his usual &#8220;h4cked by whatever&#8221; everywhere. Not good.</p>
<p>The above is one variation of what is commonly called a cross-site request forgery, or just CSRF (pronounced &#8220;sea surf&#8221;). The referrer check prevents this kind of attack because when the administrator visits the external page and the form gets submitted to profile.php, PunBB detects that it was submitted from an external page and spits out a warning/error message.</p>
<p>I have, over the years, received quite a few questions regarding the referrer check. Lots of people are uncertain about its efficiency considering the ease at which HTTP_REFERER can be spoofed. Spoofing of HTTP_REFERER is a non-issue though. A hacker can spoof his own HTTP_REFERER but we don&#8217;t care about that, we&#8217;re interested in the HTTP_REFERER of the forum administrator when he submits a form. This can&#8217;t, as far as I know, be modified externally.</p>
<p>Spoofing aside, the most common issue that users have with the referrer check is that for some users, it just won&#8217;t work properly. The reason for this usually is that they have some kind of &#8220;Internet security&#8221; software suite (I put that in quotes on purpose) installed that strips out HTTP_REFERER from all browser requests. Other users have encountered problems with proxies that strip out or alter HTTP_REFERER. The bottom line is that there are lots of ways in which the referrer check can fail, and we can&#8217;t have that.</p>
<p>In PunBB 1.3, the referrer check is no more. To replace it, we&#8217;ve implemented an anti-CSRF token system. Fancy words for something relatively simple. Here&#8217;s how it works.</p>
<p>All users browsing a PunBB 1.3 forum are assigned a temporary random SHA1 hash that we refer to as the CSRF token. The token is only valid for one session. As soon as the user times out or logs out, the token is destroyed. Now, armed with the token, whenever we present a form to an administrator or moderator, we include the token in a hidden field in that form. Here&#8217;s an example:</p>
<pre>&lt;form method="post" action="somescript.php"&gt;
    &lt;input type="hidden" name="csrf_token" value="7fa7097b4dc1f3bc22895cd95e2183cbc165ece0" /&gt;
    the regular form fields...
&lt;/form&gt;</pre>
<p>When the form is submitted and somescript.php receives the form data, we compare the value of the hidden form field to the token we have stored for the user in question. If there&#8217;s a mismatch or if the token is missing, we display a message stating that there was a token mismatch.</p>
<p>This system prevents CSRF attacks as effectively as the referrer check, but it is much less prone to issues out of our control. The only real issue with the token system is that the token has a certain time to live. If an administrator or moderator navigates to a form in which the csrf_token field is included and then waits for an hour or so before he submits the form, he will be assigned a new token when the script that receives the form data loads and there will be a mismatch. It&#8217;s not the end of the world though. Hitting the back button, refreshing the page and then submitting again will solve the problem.</p>
<p>At this moment, the CSRF token system is only used for administrators and moderators, but in the future, we might enable its use for other user groups as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/09/18/preventing-csrf-attacks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SEF/Fancy/Pretty URLs</title>
		<link>http://blog.punbb.org/2007/03/19/seffancypretty-urls/</link>
		<comments>http://blog.punbb.org/2007/03/19/seffancypretty-urls/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 02:19:31 +0000</pubDate>
		<dc:creator>Connor</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/03/19/seffancypretty-urls/</guid>
		<description><![CDATA[Whatever you want to call them (for the purposes of this post they are SEF URLs), they&#8217;re part of 1.3, so I thought it would be a good idea to talk a little bit about them.If you&#8217;ve no idea what I&#8217;m talking about then here&#8217;s a quick intro. SEF (Search Engine Friendly) URLs means the [...]]]></description>
			<content:encoded><![CDATA[<p>Whatever you want to call them (for the purposes of this post they are SEF URLs), they&#8217;re part of 1.3, so I thought it would be a good idea to talk a little bit about them.<span id="more-11"></span>If you&#8217;ve no idea what I&#8217;m talking about then here&#8217;s a quick intro. SEF (Search Engine Friendly) URLs means the URL to a page on PunBB takes a form which resembles a more classic (static) website, and may well end in a prefix such as .html, 1.3 is going to ship with the option to use a number of what we are calling &#8220;URL schemes&#8221; which basically means a consistent style of URLs that will be used throughout the forum, wherever possible. One requirement of these is that apache is used with mod_rewrite enabled and you place a .htaccess file from the extras folder included with PunBB in the root of your forum.</p>
<p>A number of basic schemes will be included with PunBB, these will be firstly simple file and folder stuctures such as<br />
http://forums.punbb.org/forum-23.html  or http://forums.punbb.org/forum/23/<br />
for the 23rd forum, it will also include two similar schemes which will also incorporate text from the title of the forum or post into the URL (this is the SEF part), such as<br />
http://forums.punbb.org/forum23-Feature-requests.html  or http://forums.punbb.org/forum23/Feature-requests/</p>
<p>1.3 will also come with the functionality to add more schemes simply by dropping files into a folder in a similar way styles or languages are added now.</p>
<p>When creating the URL schemes a number of important considerations had to be taken, first of all as this is PunBB it had to be as fast and as simple as possible for the elements of a link to be converted to a URL, so this is done simply with a list of the different URL formats and how each one should be output. Another important consideration was how permenant a URL would be when admins have the option to switch schemes. This has lead to a &#8220;hybrid&#8221; .htaccess file being created which processes URLs from all the provided schemes, meaning even if a URL scheme is not currently in use, the URLs it generated will still work (assuming .htaccess still exists as it did).</p>
<p>To round this off, I think we&#8217;ve managed to produce a simple but effective way to scheme URLs, and have implemented it in such a way it won&#8217;t lead to dead ends (and inevitably poor search engine rankings) in the future, however since this isn&#8217;t simply PHP there are a lot more variations from setup to setup than we normally have to deal with, so here&#8217;s where you come in. If you are testing 1.3 it would be extremely useful if you could try out the schemes it currently has available, and report back if you have any issues. If you do have issues please give as much information as you can, apache version is critical as well as exactly what kind of error you are having (500 or 404 server errors etc.).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/03/19/seffancypretty-urls/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The new update script</title>
		<link>http://blog.punbb.org/2007/03/13/the-new-update-script/</link>
		<comments>http://blog.punbb.org/2007/03/13/the-new-update-script/#comments</comments>
		<pubDate>Tue, 13 Mar 2007 09:03:13 +0000</pubDate>
		<dc:creator>Rickard</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/03/13/the-new-update-script/</guid>
		<description><![CDATA[As some of you might have noticed, I committed a revised update script the other day. The big change this time is that the update script contains code that runs through all the text in your database and encodes it into UTF-8.

I talked about this in my previous post about the UTF-8 migration. However, in [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you might have noticed, I committed a revised update script the other day. The big change this time is that the update script contains code that runs through all the text in your database and encodes it into UTF-8.</p>
<p><span id="more-10"></span></p>
<p>I talked about this in my previous post about the UTF-8 migration. However, in that post I discussed taking a database dump, running iconv on it and then re-importing it. With the new update script, that won&#8217;t be necessary unless the current encoding is non-ISO-8859-1 and the PHP environment lacks iconv and mbstring support. I believe this scenario will be relatively uncommon, particularly since any PHP5 environment should have iconv right out of the box. For ISO-8859-1, there&#8217;s no need for iconv or mbstring since we can use PHP&#8217;s built-in utf8_encode() function.</p>
<p>It would be great if you guys could test the new script. I&#8217;ve run it on a couple of semi-large database dumps and it appears to work just fine, but there&#8217;s only so many test cases I can come up with on my own. Do remember to make a backup of anything you attempt to convert.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/03/13/the-new-update-script/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Auto subscription</title>
		<link>http://blog.punbb.org/2007/02/25/auto-subscription/</link>
		<comments>http://blog.punbb.org/2007/02/25/auto-subscription/#comments</comments>
		<pubDate>Sun, 25 Feb 2007 17:17:06 +0000</pubDate>
		<dc:creator>Frank H</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/02/25/auto-subscription/</guid>
		<description><![CDATA[Hello
My first entry on the blog will be a rather short one, but at least you see that I&#8217;m alive. ;)
I&#8217;ve comitted changeset 908 which adds the possibility to auto subscribe to topics you post in.

While I was adding this functionality I also modified how the checkbox for subscriptions works. In PunBB 1.2 the checkbox [...]]]></description>
			<content:encoded><![CDATA[<p>Hello</p>
<p>My first entry on the blog will be a rather short one, but at least you see that I&#8217;m alive. ;)</p>
<p>I&#8217;ve comitted <a href="http://dev.punbb.org/changeset/908">changeset 908</a> which adds the possibility to auto subscribe to topics you post in.<br />
<span id="more-9"></span><br />
While I was adding this functionality I also modified how the checkbox for subscriptions works. In PunBB 1.2 the checkbox is not doing anything if you&#8217;re already subscribed to the topic, no matter if you check/uncheck the box, you stay subscribed. With this changeset for PunBB 1.3, the checkbox will become checked if you&#8217;re already subscribed, and if you decide that you no longer want to be subscribed while you&#8217;re making a post, just uncheck the checkbox and you will be unsubscribed when you post your reply.</p>
<p>Not that much, but at least something ;)</p>
<p>~Frank H</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/02/25/auto-subscription/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hashing passwords</title>
		<link>http://blog.punbb.org/2007/02/21/hashing-passwords/</link>
		<comments>http://blog.punbb.org/2007/02/21/hashing-passwords/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 23:07:31 +0000</pubDate>
		<dc:creator>Neal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/02/21/hashing-passwords/</guid>
		<description><![CDATA[Hey everyone,
In keeping with the current stream of entries, this one is also about a new feature in PunBB 1.3: the improved password hashing implementation.
First though, it&#8217;s worth taking a look at how PunBB&#8217;s password hashing system currently works. PunBB 1.2 uses a function called pun_hash to decide which hashing algorithm to use. The function [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everyone,</p>
<p>In keeping with the current stream of entries, this one is also about a new feature in PunBB 1.3: the improved password hashing implementation.<span id="more-5"></span></p>
<p>First though, it&#8217;s worth taking a look at how PunBB&#8217;s password hashing system currently works. PunBB 1.2 uses a function called pun_hash to decide which hashing algorithm to use. The function chooses SHA-1 if it is available: otherwise, it chooses MD5. The passwords stored in the database are simply hashes of the plaintext passwords: there is no <a href="http://en.wikipedia.org/wiki/Salt_%28cryptography%29" title="salt">salt</a> added to the hashes. The values stored in cookies are MD5 hashes of password hashes from the database combined with the sitewide $cookie_seed. In case my explanation confused you, I&#8217;ve written a couple code examples below.</p>
<p>A password stored in the database is created by</p>
<p><code>pun_hash($plaintext_password)</code></p>
<p>and a cookie password hash is created by</p>
<p><code>md5($cookie_seed.pun_hash($plaintext_password))</code></p>
<p>1.2&#8217;s implementation is good, but it has several places it can be improved:</p>
<ol>
<li>There is no salting done in the database, which means that any passwords grabbed directly from the database (via SQL inject, etc) are more vulnerable to attacks using <a href="http://en.wikipedia.org/wiki/Rainbow_table" title="rainbow tables">rainbow tables</a>.</li>
<li>Everyone&#8217;s cookie hash uses the same salt. Thus, a malicious user could take his/her cookie hash and his/her password (which he/she knows, obviously) and use brute force to find the value of $cookie_seed. Once the malicious user has that value, his/her brute force attacks just became simpler to do (although the malicious user would still need to steal another user&#8217;s cookie value via XSS or some other method).</li>
</ol>
<p>So, how does 1.3 improve upon 1.2&#8217;s password security?</p>
<ol>
<li> PunBB 1.3 <span style="font-weight: bold">requires</span> SHA-1 hashing. The pun_hash function has been eliminated as a result. But have no fear, any passwords stored as MD5 are &#8220;upgraded&#8221; when the user logs in the first time.</li>
<li>The sitewide $cookie_seed has been abandoned in favor of a new feature I will talk about in just a few seconds. $cookie_seed added relatively little security overall and there was no real need to keep it hanging around.</li>
<li>All rows in the users table now have a new column, salt. That column stores a 12 character long salt which is randomly generated for each user. That&#8217;s right, PunBB now has per-user salts!</li>
</ol>
<p>To go a little more in depth with #3, the salt is made up of 12 characters which have ASCII values between 33 and 126 (inclusive). That salt is used when storing the password in the database and when generating the cookie password hash (they are now exactly the same value). So, the code to generate a password hash now looks something like:</p>
<p><code>sha1($user_salt.sha1($plaintext_password))</code></p>
<p>where $user_salt is the randomly generated salt that each user has.</p>
<p>Some of the benefits of this new implementation:</p>
<ul>
<li>2 users with the same plaintext password should not have the same hashed password (unless they randomly are given the same salt). In addition, a user who uses the same password on 2 user accounts will have 2 different password hashes (again, assuming the user does not randomly get identical salts).</li>
<li>Because every password is salted and hashed in the database, it&#8217;s impossible for a malicious user to launch an attack against all passwords in the database at the same time. Each user&#8217;s password would have to be brute forced individually.</li>
<li>There are only per-user salts, so a malicious user who brute forces his/her own hashed password will just get his/her per-user salt, which isn&#8217;t useful for breaking the passwords of others.</li>
</ul>
<p>Of course, even with this wonderful salting, there is no substitute for a good, strong password. However, that&#8217;s a bit beyond the scope of this entry: if people are interested in learning some guidelines for secure passwords, they can read some of <a href="http://www.theadminzone.com/forums/showthread.php?t=10859">this topic</a>.</p>
<p>~ Smartys</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/02/21/hashing-passwords/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building extensions</title>
		<link>http://blog.punbb.org/2007/02/21/building-extensions/</link>
		<comments>http://blog.punbb.org/2007/02/21/building-extensions/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 20:00:26 +0000</pubDate>
		<dc:creator>Kristoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/02/21/building-extensions/</guid>
		<description><![CDATA[Hi,
I hope my last post shone some light upon the upcoming extension system. I told you there where two major problems with today&#8217;s mods, and I addressed the first one. Now, it&#8217;s time for the second one.

Ever since mods where introduced by the community, and we agreed on the standard of the &#8220;ReadMe-file&#8221;, we&#8217;ve heard [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I hope my last post shone some light upon the upcoming extension system. I told you there where two major problems with today&#8217;s mods, and I addressed the first one. Now, it&#8217;s time for the second one.</p>
<p><span id="more-8"></span></p>
<p>Ever since mods where introduced by the community, and we agreed on the standard of the &#8220;ReadMe-file&#8221;, we&#8217;ve heard several complaints about what a pain they are to make. Not to mention when you where required to fix something, or God forbid, release a new version. That often led to rewriting the whole ReadMe-file. Being one of the first mod developers in the community myself, I was quick to realise that something needed to be done, and I created the &#8220;ModGenerator&#8221;. This was a web-based application that you could use to easily modify and create new ReadMe-files from your browser. It worked fine for a while, but due to the not so well written code and lack of time, the ModGenerator development was cancelled.</p>
<p>Some time passed and several other attempts to create a &#8220;ModGenerator&#8221; was made by various people. They mostly provided little help in the actual making of the mod, but made a nice tool to put your mod together in a ReadMe-file once you where done. Today, when we&#8217;re about the roll out the new extension system, the problem still remain, and it has probably grown even larger. You see, the extension, in it&#8217;s core, is made up from a somewhat more complicated XML file.</p>
<p>Rickard said to me once that we should think about creating something like the ModGenerator (which he was very fond of, *creds to me, yay*) for the extension system. I said I&#8217;d think about it, and I did, for quite some time. At first, I was focused on creating something web-based that would be located in the admin pages, allowing you to put your extension together, but I always got caught up in the swamp that is user-friendliness, and the balance between it and features. You don&#8217;t want it to be useless, but you also want it to be simple enough to be fast and easy to start working with. When this will aOf course, there will be an extension that lets you work with your extensions through PunBB&#8217;s admin panel. rrive, whether it&#8217;ll be here at 1.3 launch or not, we&#8217;ll see. This isn&#8217;t the main point of this post though. What I&#8217;m going to tell you is what happened to my ideas about how you would make life easier for the extension developers.</p>
<p>So, several months later, I began working with C# and I started thinking, what if you created a full blown application that would not only put your extensions together, it will help you write them as well. An environment that will help you organise your files and hooks, and provide powerful tools to speed up the development in general.</p>
<p>I present to you, <strong>PunXS</strong>!</p>
<p>What is it, you ask? Well, it&#8217;s all of the above. It&#8217;s written in C# so it&#8217;s based on .NET technology. It&#8217;ll be released under GPL, and there will be a working release of it before 1.3 comes out for everybody to start working on upgrading their mods to 1.3. It comes with a powerful hook-editor that let you code your hooks right in there with the rest of the PunBB code, and it finds the hooks automatically. This helps decreasing the need for new versions if hooks should be added or changed. Also, you can at any time, preview your extension in your local PunBB installation by a single click on your mouse.</p>
<p><em>- Ok, sounds great, is there a screenshot or something?</em></p>
<p>There&#8217;s a video:</p>
<p><a href="http://www.punxs.org/preview/?show=hook_editor">Click here to view PunXS preview video</a></p>
<p>If you&#8217;re a mod developer, or a to-be extension developer, please take some time and try to come up with some features that you think will be useful. Not all features have been announced yet, so chances are they are already in there or on the todo-list, but that matters not, the more ideas the better!</p>
<p><a href="http://www.punxs.org">Official PunXS Site</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/02/21/building-extensions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mods &#038; extensions</title>
		<link>http://blog.punbb.org/2007/02/14/mods-extensions/</link>
		<comments>http://blog.punbb.org/2007/02/14/mods-extensions/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 18:57:19 +0000</pubDate>
		<dc:creator>Kristoffer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.punbb.org/2007/02/14/mods-extensions/</guid>
		<description><![CDATA[Hi there,
Kristoffer here, or Jansson as I&#8217;m also called. If you haven&#8217;t heard of me, I&#8217;m the guy behind PunRes. I&#8217;ve been a user of PunBB since sometime in beta, and a developer since November. What&#8217;s always been fascinating to me about PunBB is that the code is so simple and structured that anyone with [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there,</p>
<p>Kristoffer here, or Jansson as I&#8217;m also called. If you haven&#8217;t heard of me, I&#8217;m the guy behind PunRes. I&#8217;ve been a user of PunBB since sometime in beta, and a developer since November. What&#8217;s always been fascinating to me about PunBB is that the code is so simple and structured that anyone with even the smallest PHP knowledge are able to modify it to their own needs. This is very important to PunBB as it ships with a rather slim set of features.</p>
<p><span id="more-7"></span>It is almost impossible to make software that appeals to everybody. The reason for this is that everybody&#8217;s needs are different. However, there is a solution, and it&#8217;s quite simple: Let the users decide their own set of features! As I write this, there are 269 projects/modifications at PunRes and new ones are created at a regular basis. All the common features are there, private messaging, polls, attachments, gallery, wiki, you name it. There are several reasons modding has become such a widespread thing in the PunBB community. Firstly, because the code is kept simple enough for most people to understand it, we almost get this for free by not implementing huge and complex systems in the main package. Secondly, modding has been around since the release of PunBB 1.0, and even before. Thirdly, the availability. PunRes has always been there to keep all mods in one place for the users to browse and discuss modding.</p>
<p>There is only one downside with mods, and it&#8217;s huge. Actually, there&#8217;s two, but let&#8217;s concentrate on one of them. It relates to the way in which mods are installed. Installing a mod requires the user to modify the source manually. This can be a bit complicated for the inexperienced user, and there are often mistakes. Another problem is when updates to PunBB are released, you either have to install all the mods again manually, or apply the PunBB update manually, either way it can be very annoying. This also indirectly leads to less security because some people don&#8217;t bother updating at all. Wouldn&#8217;t it be awesome if you could just install a mod by a single click on your mouse?</p>
<p><em>Enter PunBB 1.3.</em></p>
<p>With 1.3, there will be Extensions. Extensions are not mods, though sometimes referred to as &#8220;the mods of 1.3&#8243;. Mods and extensions are completely different things created to solve the same problem; let the user decide. The extension, instead of editing the source directly, hooks into the code at specific locations causing PunBB to behave different. The source of the extension is stored separately in the database and can therefore be put in and be taken out at any given time without anyone touching a single line of PHP code. I will not go into any technical details at the time but focus on the advantage of this new system. Apart from the obvious ease of installation, it also makes updating PunBB as easy as cake.</p>
<p>Mods have never been officially supported, and Extensions in themselves won&#8217;t be either. However, now when the developer team consists of more than one guy we will be able to create &#8220;official extensions&#8221; that are sure to always be compatible with the latest version, plus they will come with the same exceptional quality as the rest of PunBB. It will also allow us to update the extensions without having to release a new version of PunBB each time, making the users that doesn&#8217;t use the feature less annoyed. Mods will probably continue to exist as they do today, though they just won&#8217;t be as many. PunRes will be focusing on extensions and mods will be shared primarily through the wiki.</p>
<p><span style="font-style: italic">What about the Plug-ins?</span></p>
<p>Yes, the plug-ins will also be replaced by the extension system as it will be possible to acquire the same functionality through extensions.</p>
<p>As I said above, there are two problems with today&#8217;s mods, the first one is the user&#8217;s problem, and the second one is the developer&#8217;s. Feel free to speculate about what it is, it shouldn&#8217;t be too hard to guess. There is a solution to the problem in the making, but I won&#8217;t reveal that just yet, it has been hinted about on the forums though :-)</p>
<p>Take care,<br />
Kristoffer</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punbb.org/2007/02/14/mods-extensions/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
