<?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>Moggylaceous &#187; Wordpress</title>
	<atom:link href="http://moggy.laceous.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://moggy.laceous.com</link>
	<description>If nothing we do matters, then all that matters is what we do.</description>
	<lastBuildDate>Tue, 22 Jun 2010 02:12:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Forced Semisecure Login</title>
		<link>http://moggy.laceous.com/2010/06/12/forced-semisecure-login/</link>
		<comments>http://moggy.laceous.com/2010/06/12/forced-semisecure-login/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 04:02:59 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[semisecure]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=232</guid>
		<description><![CDATA[(This post relates to my plugin: Semisecure Login Reimainged) Awhile back, Viper asked if it would be possible to force the user to log in with encryption. Currently, if you disable JavaScript, you can log in without encryption. This is actually something that I really liked about the original Semisecure Login. If something were to [...]]]></description>
			<content:encoded><![CDATA[<p>(This post relates to my plugin: <a href="http://wordpress.org/extend/plugins/semisecure-login-reimagined/">Semisecure Login Reimainged</a>) Awhile back, Viper <a href="http://moggy.laceous.com/2009/09/05/semisecure-login-reimagined-v3/comment-226/#comment-226">asked</a> if it would be possible to force the user to log in with encryption.  Currently, if you disable JavaScript, you can log in without encryption.  This is actually something that I really liked about the original <a href="http://wordpress.org/extend/plugins/semisecure-login/">Semisecure Login</a>.  If something were to ever go wrong with the plugin, you wouldn&#8217;t be locked out of your website.</p>
<p>At this point I&#8217;m not sure if I want to add the following to the main plugin, but here&#8217;s an additional plugin that would force the user to log in with JavaScript enabled (which would also force encryption).  It&#8217;s been tested with WP 2.9 and 3.0 RC.</p>
<pre>
&lt;?php
/*
Plugin Name: Forced Semisecure Login
Plugin URI: http://moggy.laceous.com/2010/06/12/forced-semisecure-login/
Description: By default, &lt;a href="http://wordpress.org/extend/plugins/semisecure-login-reimagined/"&gt;Semisecure Login Reimainged&lt;/a&gt; allows the user to disable JavaScript to log in without encryption.  This plugin forces the user to have JavaScript enabled so that they log in with encryption. (Only applies to the log in page)
Author: moggy
Version: 1.0
Author URI: http://moggy.laceous.com/
*/

add_action('login_head', 'forced_semisecure_login_login_head');
function forced_semisecure_login_login_head() {
  // Hack! The logged out page clears the $errors variable, but it still allows the $error variable
  if ( !empty($_GET['loggedout']) || $GLOBALS['reauth'] ) {
    $GLOBALS['error'] = '&lt;strong&gt;Semisecure Login&lt;/strong&gt;: Please enable JavaScript in order to log in!';
  }
?&gt;
  &lt;style type="text/css"&gt;
  #loginform {
    display:none;
  }
  &lt;/style&gt;
&lt;?php
}

add_action('login_form', 'forced_semisecure_login_login_form');
function forced_semisecure_login_login_form() {
?&gt;
  &lt;script type="text/javascript"&gt;
  document.getElementById('loginform').style.display = 'block';
  if (document.getElementById('login_error')) {
    if (document.getElementById('login_error').innerHTML.indexOf('&lt;strong&gt;Semisecure Login&lt;/strong&gt;: Please enable JavaScript in order to log in!') != -1) {
      document.getElementById('login_error').style.display = 'none';
    }
  }
  &lt;/script&gt;
&lt;?php
}

// This needs to happen after the built-in WordPress authenticate hook(s)
add_filter('authenticate', 'forced_semisecure_login_authenticate', 9999, 3);
function forced_semisecure_login_authenticate($user, $username, $password) {
  if ( is_a($user, 'WP_User') ) { return $user; }

  if (is_wp_error($user)) {
    if ( $user-&gt;get_error_codes() == array('empty_username', 'empty_password') ) {
      return new WP_Error('semisecure_error', '&lt;strong&gt;Semisecure Login&lt;/strong&gt;: Please enable JavaScript in order to log in!');
    }
    else {
      return $user;
    }
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2010/06/12/forced-semisecure-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Semisecure Login Reimagined v3.1</title>
		<link>http://moggy.laceous.com/2010/06/03/semisecure-login-reimagined-v3-1/</link>
		<comments>http://moggy.laceous.com/2010/06/03/semisecure-login-reimagined-v3-1/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 05:52:30 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[semisecure]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=229</guid>
		<description><![CDATA[One of the biggest new features in WordPress 3.0 is the integration of WPMU (WordPress Multi-user). In WP 3.0, this functionality has been renamed from multi-user to multi-site. The idea is that you only have to install WordPress once, and can then create a network of multiple sites (i.e. blogs). There&#8217;s a pretty good walkthough [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest new features in WordPress 3.0 is the integration of <a href="http://codex.wordpress.org/WPMU">WPMU</a> (WordPress Multi-user).  In WP 3.0, this functionality has been renamed from multi-user to multi-site.  The idea is that you only have to install WordPress once, and can then create a network of multiple sites (i.e. blogs).  There&#8217;s a pretty good walkthough showing how to set this up over at <a href="http://weblogtoolscollection.com/archives/2010/06/02/wordpress-3-multisite/">Weblog Tools Collection</a>.</p>
<p>Semisecure Login Reimagined v3.1 is an update mainly dealing with multi-site integration.  My thinking was that if you have a multisite install and want to use a plugin like this one (meaning that you don&#8217;t have an SSL certificate but want a little extra security), you probably want the plugin to be enabled globally throughout your network.  If you&#8217;re a super admin in your network, you can do this by <em>network activating</em> this plugin.  Once activated, you&#8217;ll see a new &#8220;Semisecure Login&#8221; menu item attached to the &#8220;Super Admin&#8221; menu.  All of the settings can be controlled thoughought your network from this new menu item.  (Note: if you choose to activate the plugin individually for each site in your network then it will still add a new menu item to the &#8220;Super Admin&#8221; menu, and it will still be controlled globally, but the plugin will only work on the sites it has been activated on)</p>
<p>If you want, you can also choose to override some of the global options on individual sites.  You can restrict these override options to super admins or, additionally, give individual site admins access.  Most options outside of the RSA key are available to be overridden.  Override settings are attached as a menu item to each site&#8217;s &#8220;Settings&#8221; menu.</p>
<p>If you&#8217;re using multisite and decide that you don&#8217;t want any global options, there&#8217;s a new advanced option that will make the plugin think it&#8217;s in a single site install.  (New in v3.1: advanced options have been changed to a set of <a href="http://www.php.net/manual/en/function.define.php">defines</a>)  Simply add the following to your <a href="http://codex.wordpress.org/Editing_wp-config.php">wp-config.php</a> file:</p>
<pre>
define('SEMISECURELOGIN_REIMAGINED__OVERRIDE_IS_MULTISITE', TRUE);
</pre>
<p>Other updates include:</p>
<ul>
<li>JavaScript keypair generation has been removed</li>
<li>Public exponent option on the keypair generation form has been removed</li>
<li>The uninstall tab on the settings page has been removed (although the <a href="http://jacobsantos.com/2008/general/wordpress-27-plugin-uninstall-methods/">uninstall.php</a> file is still available)</li>
<li>Password encryption on the user administration pages is now turned on by default</li>
<li>The default RSA keypair size is now 2048 bits (previously it was 1024 bits)</li>
<li>For multisite installs, there&#8217;s a new option to force UTF-8 for all the sites in your network (changing the character encoding is normally something you have to do on a site by site basis)</li>
<li>If you want to display the custom integration instructions publicly, you can use the following <a href="http://codex.wordpress.org/Shortcode_API">shortcode</a>: [semisecurelogin_reimagined_integration]</li>
<li>The jsbn (RSA JavaScript) library uses some fairly generic names and puts most of them in the global scope. This can lead to JavaScript conflicts.  For now, all of the names in the global scope have been prefixed with &#8220;jsbn_&#8221;</li>
</ul>
<p>Finally, the required WP version has been bumped to 2.8.</p>
<p><span style="text-decoration: underline;">Download</span><br />
The download is still available over at <a href="http://wordpress.org/extend/plugins/semisecure-login-reimagined/">wordpress.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2010/06/03/semisecure-login-reimagined-v3-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Attachment Page Comment Control</title>
		<link>http://moggy.laceous.com/2010/04/04/attachment-page-comment-control/</link>
		<comments>http://moggy.laceous.com/2010/04/04/attachment-page-comment-control/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 02:27:31 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=228</guid>
		<description><![CDATA[As I previously posted, WordPress doesn&#8217;t offer any UI options that let you pick and choose which attachment pages should be capapble of receiving comments and pings. WordPress has a few default options that apply to all post types (including attachment pages). You can also go directly to the database on a post-by-post basis, but [...]]]></description>
			<content:encoded><![CDATA[<p>As I <a href="http://moggy.laceous.com/2007/07/21/attachment-page-mgmt-plugin/">previously</a> posted, WordPress doesn&#8217;t offer any UI options that let you pick and choose which attachment pages should be capapble of receiving comments and pings.  WordPress has a few default options that apply to all post types (including attachment pages).  You can also go directly to the database on a post-by-post basis, but this option is not exposed in the WordPress UI.</p>
<p>That previous post also marked the release of one of my first WordPress plugins.  The plugin (originally created for WordPress 2.2) provided its own administrative page that queried the database directly.  When WordPress 2.5 was released, it brought along a new media library.  Rather than continuing to rely on a plugin that did everything from scratch, I decided to piggy-back on the media library.</p>
<p>Fast forward a few years&#8230; and now you can download <a href="http://wordpress.org/extend/plugins/attachment-page-comment-control/">Attachment Page Comment Control</a> from its official WordPress page.  (Screenshots, changelog, etc are all located over there)</p>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2010/04/04/attachment-page-comment-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Semisecure Integration</title>
		<link>http://moggy.laceous.com/2009/11/25/semisecure-integration/</link>
		<comments>http://moggy.laceous.com/2009/11/25/semisecure-integration/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 13:58:39 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=227</guid>
		<description><![CDATA[Semisecure Login Reimagined supports 3rd-party integration. This might be useful if you have a custom plugin/widget that allows you to submit a password to login (or for registration). Information on how the integration works can be found on the plugin&#8217;s settings page. Up until now I haven&#8217;t seen any complete examples. To fill the gap, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://moggy.laceous.com/2009/09/05/semisecure-login-reimagined-v3/">Semisecure Login Reimagined</a> supports 3rd-party integration. This might be useful if you have a custom plugin/widget that allows you to submit a password to login (or for registration). Information on how the integration works can be found on the plugin&#8217;s settings page. Up until now I haven&#8217;t seen any complete examples. To fill the gap, here&#8217;s a complete example using the <a href="http://wordpress.org/extend/plugins/register-plus/">Register Plus</a> plugin (which allows you to enter your own password when registering):</p>
<p>(This should only be considered a reference; I&#8217;m not supporting the following plugin)</p>
<pre>
&lt;?php
/*
Plugin Name: SemisecureLoginReimagined-RegisterPlus-Bridge
Plugin URI: http://moggy.laceous.com
Description: Integrate SemisecureLoginReimagined with RegisterPlus (reference implementation; tested with: PHP 5.2.9, WP 2.8.6, SLR 3.0.8.3, RP 3.5.1)
Author: moggy
Author URI: http://moggy.laceous.com
Version: 1.0
*/

// hook into the registration form (wp-login.php?action=register)
// make sure this function runs before RegisterPlus
add_action('register_form', 'slr_rp_b_register_form', -1000);
function slr_rp_b_register_form() {
  // if both plugins are activated (and configured)
  if (slr_rp_b_plugins_activated()) {
    // if there are any errors, RegisterPlus will pass the unencrypted password from the server to the browser
    // this stops the password from being sent in the clear
    if (isset($_POST['pass1']))
      unset($_POST['pass1']);
    if (isset($_POST['pass2']))
      unset($_POST['pass2']);
  }
}

// hook into the head section of the registration page (wp-login.php?action=register)
add_action('login_head', 'slr_rp_b_login_head');
function slr_rp_b_login_head() {
  // if this is the registration page and both plugins are activated (and configured)
  if ($_GET['action'] == 'register' &amp;&amp; slr_rp_b_plugins_activated()) {
    // Make sure that all the external JavaScript is available (including jQuery)
    SemisecureLoginReimagined::enqueue_js(true);
    // insert our custom JavaScript
    ?&gt;
    &lt;script type="text/javascript"&gt;
    //&lt;![CDATA[
      jQuery(document).ready(function($) {
        // display a default message
        $('#pass2').after('&lt;span id="semisecure-message"&gt;Semisecure Login is enabled.&lt;/span&gt;');

        // Bind to the form's submit event
        $('form#registerform').submit(function() {
          // update the message when the form is submitted
          $('#semisecure-message').text('Encrypting password &amp; submitting...');

          // Collect the password(s)...
          var pass1 = $('#pass1').val();
          var pass2 = $('#pass2').val();
          var passwords = [];
          passwords[0] = pass1;
          passwords[1] = pass2;

          // ...and form name(s)
          var names = [];
          names[0] = $('#pass1').attr('name');
          names[1] = $('#pass2').attr('name');

          // Pass the needed PHP values over to the JavaScript side
          var public_n = '&lt;?php echo SemisecureLoginReimagined::public_n(); ?&gt;';
          var public_e = '&lt;?php echo SemisecureLoginReimagined::public_e(); ?&gt;';
          var uuid = '&lt;?php echo SemisecureLoginReimagined::uuid(); ?&gt;';
          var nonce_js = '&lt;?php echo SemisecureLoginReimagined::nonce_js(); ?&gt;';
          var max_rand_chars = '&lt;?php echo SemisecureLoginReimagined::max_rand_chars(); ?&gt;';
          var rand_chars = '&lt;?php echo addslashes(SemisecureLoginReimagined::rand_chars()); ?&gt;';
          var secret_key_algo = '&lt;?php echo SemisecureLoginReimagined::secret_key_algo(); ?&gt;';

          // Encrypt the password(s)
          var arr = SemisecureLoginReimagined.encrypt(passwords, names, nonce_js, public_n, public_e, uuid, secret_key_algo, rand_chars, max_rand_chars);

          if (arr) {
            // Loop through the array and append the controls to the form
            for (var i = 0; i &lt; arr.length; i++) {
              $('form#registerform').append(arr[i]);
            }

            // Finally, don't submit the plain-text password(s)
            // One option is to submit asterisks in place of the actual password
            var temp1 = '';
            var temp2 = '';
            for (var i = 0; i &lt; pass1.length; i++) { temp1 += '*'; }
            for (var i = 0; i &lt; pass2.length; i++) { temp2 += '*'; }
            $('#pass1').val(temp1);
            $('#pass2').val(temp2);
            // Another option is to disable the control(s) with the plain-text password(s) altogether
            $('#pass1').attr('disabled', 'true');
            $('#pass2').attr('disabled', 'true');
            return true;
          }
          else {
            $('#semisecure-message').text('Problem encrypting password! Please disable JavaScript to submit without encryption.');
            return false;
          }
        });
      })
    //]]&gt;
    &lt;/script&gt;
    &lt;?php
  }
}

function slr_rp_b_plugins_activated() {
  // if SemisecureLoginReimagined v3 is activated (tested w/ v3.0.8.3)
  // Note: v3.0.5 fixed a bug with the version method in this context
  if (method_exists('SemisecureLoginReimagined', 'version') &amp;&amp; version_compare(SemisecureLoginReimagined::version(), '3.0', '&gt;=')) {
    // if the RSA keypair has been generated and openssl is available
    if (SemisecureLoginReimagined::is_rsa_key_ok() &amp;&amp; SemisecureLoginReimagined::is_openssl_avail()) {
      // if RegisterPlus is activated (tested w/ v3.5.1)
      if (class_exists('RegisterPlusPlugin')) {
        // if registrants can enter their own password
        $regplus = get_option( 'register_plus' );
        if (is_array($regplus) &amp;&amp; $regplus['password']) {
          return true;
        }
      }
    }
  }
  return false;
}

?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2009/11/25/semisecure-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Semisecure Login Reimagined v3</title>
		<link>http://moggy.laceous.com/2009/09/05/semisecure-login-reimagined-v3/</link>
		<comments>http://moggy.laceous.com/2009/09/05/semisecure-login-reimagined-v3/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 15:54:02 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=223</guid>
		<description><![CDATA[Semisecure Login Reimagined v3 is now available. This release includes a number of changes from previous versions. For starters, past versions relied on RSA public-key encryption alone. Version 3 now uses a combination of public and secret-key encryption. This means that there is no longer a limit on the length of passwords that can be [...]]]></description>
			<content:encoded><![CDATA[<p>Semisecure Login Reimagined v3 is now available. This release includes a number of changes from previous versions.</p>
<p>For starters, past versions relied on <a href="http://en.wikipedia.org/wiki/RSA">RSA</a> public-key encryption alone. Version 3 now uses a combination of public and secret-key encryption. This means that there is no longer a limit on the length of passwords that can be encrypted. The limit in earlier versions was large enough that I doubt it affected anyone, however.</p>
<p>Initially, two secret-key algorithms are provided: <a href="http://en.wikipedia.org/wiki/RC4">RC4</a>  (a stream cipher) and <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a> (a block cipher). On the JavaScript side I chose to go with the <a href="http://code.google.com/p/crypto-js/">crypto-js</a> library. Unfortunately, there wasn&#8217;t a complimentary PHP library so I ended up converting the majority of crypto-js to PHP.</p>
<p>Past versions of this plugin didn&#8217;t behave themselves very well when stepping outside of the <a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> character bounds. (Western <a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a> might be more technically correct.) Version 3 now has support for <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> passwords. Only UTF-8 is supported. If your blog is using another character encoding then your mileage may vary.</p>
<p>The settings page was starting to get long and unwieldy. This has been corrected by splitting each section into sub-pages.</p>
<p>If you&#8217;re having trouble generating an RSA keypair then you can now (optionally) display some debugging information to get you pointed in the right direction.</p>
<p>The main reason that the version has been bumped up to version 3 (rather than&#8230; say&#8230; 2.5) is because the integration API has changed. This change was necessary because of the secret-key addition. Hopefully now, the integration has also been simplified a bit.</p>
<p>Finally, support for older versions of WordPress has been dropped. Semisecure Login Reimagined v3 requires WP 2.7 (or higher) and PHP 4.3 (or higher). Seriously, if you&#8217;re running an older version of WordPress you&#8217;re just asking to be hacked! <a href="http://www.php.net/manual/en/book.openssl.php">OpenSSL</a> is still required, but no other PHP extensions are required (including mcrypt, etc).</p>
<p><span style="text-decoration: underline;">Download</span><br />
The download location hasn&#8217;t changed :) You can still download <a href="http://wordpress.org/extend/plugins/semisecure-login-reimagined/">Semisecure Login Reimagined</a> at its official WordPress page.</p>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2009/09/05/semisecure-login-reimagined-v3/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Semisecure Login Reimagined v2</title>
		<link>http://moggy.laceous.com/2009/06/11/semisecure-login-reimagined-v2/</link>
		<comments>http://moggy.laceous.com/2009/06/11/semisecure-login-reimagined-v2/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 09:43:18 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=64</guid>
		<description><![CDATA[With the release of WordPress 2.8, I&#8217;m releasing Semisecure Login Reimagined v2. This new version now requires WordPress 2.2 or higher (v1 required WP 2.1 or higher). Programming note: while v1 of this plugin supported WP 2.1, it also required PHP 4.3. Techincally, WP 2.1.x, 2.2.x, and 2.3.x only required PHP 4.2. Semisecure Login Reimagined [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of WordPress 2.8, I&#8217;m releasing Semisecure Login Reimagined v2.  This new version now requires WordPress 2.2 or higher (<a href="http://moggy.laceous.com/2008/05/30/semisecure-login-reimagined/">v1</a> required WP 2.1 or higher).</p>
<p>Programming note: while v1 of this plugin supported WP 2.1, it also required PHP 4.3.  Techincally, WP 2.1.x, 2.2.x, and 2.3.x only required PHP 4.2.  Semisecure Login Reimagined v2 should now work properly with PHP 4.2.  (Hopefully most people have upgraded to a recent version of PHP 5)</p>
<p>This new version is now using a new internal API to decrypt passwords on the server side.  Previously, it had been using the <em>wp_authenticate</em> hook, but <a href="http://willnorris.com/2009/03/authentication-in-wordpress-28">this</a> post indicates that it might be removed at some point in the near future.  The new API is much more generic and isn&#8217;t limited to just logging in.</p>
<p><span style="text-decoration: underline;">What&#8217;s New</span></p>
<ul>
<li>jQuery is now being used on the client side</li>
<li>If you&#8217;re not able to generate a keypair with the standard or alternative methods, then you can now generate a keypair via JavaScript (you&#8217;ll have to manually insert the data in your DB though)</li>
<li>If you&#8217;re using WP 2.7 or higher then you can now encrypt the password on the user administration pages (editing or adding a new user)</li>
<li>3rd-party integration support for other plugin authors (see the included help link on the plugin&#8217;s settings page)</li>
<li>You can decide which parts of this plugin to enable: activating the plugin enables the API, while the settings page lets you decide if you want to encrypt the password on the login page (enabled by default so there&#8217;s no surprises for anyone upgrading from v1) and if you want to encrypt the password on the user administration pages (disabled by default)</li>
</ul>
<p><span style="text-decoration: underline;">Download</span><br />
You can still download <a href="http://wordpress.org/extend/plugins/semisecure-login-reimagined/">Semisecure Login Reimagined</a> at its official WordPress page.</p>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2009/06/11/semisecure-login-reimagined-v2/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Paging Hemingway Part Deux</title>
		<link>http://moggy.laceous.com/2008/08/15/paging-hemingway-part-deux/</link>
		<comments>http://moggy.laceous.com/2008/08/15/paging-hemingway-part-deux/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 20:52:14 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[hemingway]]></category>
		<category><![CDATA[paging]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=61</guid>
		<description><![CDATA[A little over a year ago, I wrote a plugin that let you page the HemingwayEx home-page. Unfortunately it doesn&#8217;t work out-of-the-box with HemingwayEx 1.1 (it also wouldn&#8217;t work with vanilla Hemingway). The original version made a few assumptions that are no longer true. So here&#8217;s a new version that still works with older versions [...]]]></description>
			<content:encoded><![CDATA[<p>A little over a year ago, I wrote a <a href="http://moggy.laceous.com/2007/07/29/paging-the-hemingwayex-home-page/">plugin</a> that let you page the <a href="http://www.nalinmakar.com/hemingwayex/">HemingwayEx</a> home-page.  Unfortunately it doesn&#8217;t work out-of-the-box with HemingwayEx 1.1 (it also wouldn&#8217;t work with vanilla <a href="http://warpspire.com/hemingway/">Hemingway</a>).  The original version made a few assumptions that are no longer true.  So here&#8217;s a new version that still works with older versions of HemingwayEx (that had a built-in asides feature) as well as working with the latest version (1.1) of HemingwayEx (where the asides feature has been removed).  It will also work with the original Hemingway theme.</p>
<p>The best hook to use is still the <em>query_string</em> filter.  Unfortunately, this specific filter is technically deprecated (and may be removed at some point).  You&#8217;re supposed to use the <em>request</em> filter now.  However, the request filter doesn&#8217;t seem to provide quite as much functionality as the query_string filter.  Namely, there doesn&#8217;t appear to be a good way to check for <em>is_home</em> (which is important for our purposes).</p>
<pre>
&lt;?php

/*
 * Plugin Name: Custom Hemingway Home Query
 * Plugin URI: http://moggy.laceous.com/2008/08/15/paging-hemingway-part-deux/
 * Description: Gives you the ability to use the paging links on your homepage (works with Hemingway and HemingwayEx)
 * Version: 0.2a
 * Author: moggy
 * Author URI: http://moggy.laceous.com
 */

add_filter('query_string', 'custom_hem_home_query');
function custom_hem_home_query($query_string) {
	global $wp_query;
	$wp_query-&gt;parse_query($query_string); //required in order to check is_home
	if ($wp_query-&gt;is_home) {
		if (strlen($query_string) &gt; 0) {
			$query_string .= '&#038;';
		}
		$query_string .= 'posts_per_page=2';
		global $hemingwayEx;
		if (isset($hemingwayEx)) {
			if (method_exists($hemingwayEx, 'get_asides_category_id')) {
				$category_id = $hemingwayEx-&gt;get_asides_category_id();
				if (!is_null($category_id) &#038;&#038; !empty($category_id) &#038;&#038; is_numeric($category_id)) {
					$query_string .= '&#038;cat=-' . $category_id;
				}
			}
		}
	}
	return $query_string;
}

?&gt;
</pre>
<p>An alternate way to do this would be to hook into the <em>pre_get_posts</em> action.  Unfortunately, there&#8217;s a down-side here as well.  Namely, if you create a new <strong>WP_Query</strong> object then this method might interfere with your new WP_Query instance (rather than just affecting the main <a href="http://codex.wordpress.org/The_Loop">loop</a>).  I ran into this very problem with my asides widget, and had to throw in a category check in the code below.</p>
<pre>
&lt;?php

/*
 * Plugin Name: Custom Hemingway Home Query
 * Plugin URI: http://moggy.laceous.com/2008/08/15/paging-hemingway-part-deux/
 * Description: Gives you the ability to use the paging links on your homepage (works with Hemingway and HemingwayEx)
 * Version: 0.2b
 * Author: moggy
 * Author URI: http://moggy.laceous.com
 */

add_action('pre_get_posts', 'custom_hem_home_query', 1, 1);
function custom_hem_home_query($wp_query) {
	if (is_home()) { //at this point is_home is already set
		$wp_query-&gt;query_vars['posts_per_page'] = 2;
		//$wp_query-&gt;query['posts_per_page'] = 2; //only setting query_vars seems to matter
		if (isset($GLOBALS['hemingwayEx'])) {
			if (method_exists($GLOBALS['hemingwayEx'], 'get_asides_category_id')) {
				$category_id = $GLOBALS['hemingwayEx']-&gt;get_asides_category_id();
				if (!is_null($category_id) &#038;&#038; !empty($category_id) &#038;&#038; is_numeric($category_id)) {
					//check if the category has already been set
					//if I don't check this then it breaks my asides widget
					if (strlen($wp_query-&gt;query_vars['cat']) &lt;= 0) {
						$wp_query-&gt;query_vars['cat'] = '-' . $category_id;
					}
				}
			}
		}
	}
}

?&gt;
</pre>
<p>To get this to work you&#8217;ll still need to follow the 3 steps from my <a href="http://moggy.laceous.com/2007/07/29/paging-the-hemingwayex-home-page/">original post</a>. Namely (that&#8217;s número tres for those of you counting along at home *wink wink*), copying the PHP code into a file (i.e. <strong>custom_hem_home_query.php</strong>) and uploading to your plugins folder (don&#8217;t forget to activate the plugin when you&#8217;re ready), commenting out the custom query in your theme&#8217;s index.php file (the <em>query_posts</em> line towards the top), and adding the paging links to your home page (also in your theme&#8217;s index.php file).</p>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2008/08/15/paging-hemingway-part-deux/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Semisecure Login Reimagined</title>
		<link>http://moggy.laceous.com/2008/05/30/semisecure-login-reimagined/</link>
		<comments>http://moggy.laceous.com/2008/05/30/semisecure-login-reimagined/#comments</comments>
		<pubDate>Sat, 31 May 2008 03:28:17 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/?p=51</guid>
		<description><![CDATA[Prior to WordPress 2.5, I&#8217;d been using a plugin called Semisecure Login. This plugin would encrypt your password when logging in via a one-way md5 hash and compare this to your password&#8217;s md5 hash on the server side (prior to WordPress 2.5 passwords were stored in the database as md5 hashes). A nonce was thrown [...]]]></description>
			<content:encoded><![CDATA[<p>Prior to WordPress 2.5, I&#8217;d been using a plugin called <a href="http://jamesmallen.net/2007/09/16/semisecure-login/">Semisecure Login</a>.  This plugin would encrypt your password when logging in via a one-way <a href="http://en.wikipedia.org/wiki/MD5">md5</a> hash and compare this to your password&#8217;s md5 hash on the server side (prior to WordPress 2.5 passwords were stored in the database as md5 hashes).  A <a href="http://en.wikipedia.org/wiki/Cryptographic_nonce">nonce</a> was thrown in for good measure to help prevent replay attacks.  This, effectively, provided a &#8220;semisecure&#8221; login environment.  It obviously wasn&#8217;t as secure as using an SSL cert (it wouldn&#8217;t prevent session hijacking, etc.) but I liked it.</p>
<p>With the release of WordPress 2.5, passwords are now hashed up by <a href="http://www.openwall.com/phpass/">phpass</a> before entering the database.  Further complicating the matter, phpass salts each password before hashing.  This change effectively &#8220;breaks&#8221;  Semisecure Login.  Using a <a href="http://boren.nu/archives/2008/03/27/md5-password-hashes-for-25/">plugin</a>, it&#8217;s possible to revert back to the md5 hashes, and  <a href="http://wordpress.org/extend/plugins/semisecure-login-for-25/">Semisecure Login for WordPress 2.5</a> takes advantage of this.</p>
<p>On the other hand, I wanted to keep using the new phpass hashes and still provide a semisecure login environment.  <a href="http://www.nabble.com/Client-side-password-encryption-td16077072.html">This</a> thread details the difficulty in making this happen.  There didn&#8217;t seem to be any way to use one-way hashing, and using standard <a href="http://en.wikipedia.org/wiki/Symmetric-key_algorithm">secret-key</a> encryption was out (for obvious reasons).  The only thing that left me with was to try and use <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">public-key</a> encryption.</p>
<p><a href="http://en.wikipedia.org/wiki/RSA">RSA</a> is a popular public-key algorithm, and I was able to find a few implementations in both JavaScript and PHP.  My main criteria in picking which implementation(s) to use were (1) interoperability between JavaScript and PHP, (2) efficiency, speed, and performance and (3) a solution that would work for most shared hosts.  I ended up settling on the <a href="http://www-cs-students.stanford.edu/~tjw/jsbn/">jsbn</a> library for JavaScript and <a href="http://php.net/openssl">OpenSSL</a> on the PHP side.  Unfortunately, PHP&#8217;s built-in openssl functions are rather limited when it comes to generating RSA keypairs, so I had to rely on making calls directly against openssl when generating a keypair. This works great on a Linux server but is currently untested on Windows (although I have a feeling it would work as long as the folder where OpenSSL lives was added to the system path).</p>
<p><span style="text-decoration: underline;"><strong>Download</strong></span><br />
You can download <a href="http://wordpress.org/extend/plugins/semisecure-login-reimagined/">Semisecure Login Reimagined</a> at its official WordPress page. Additional information, such as installation instructions and changelog, are located there as well.</p>
<p><span style="text-decoration: underline;"><strong>Requirements</strong></span></p>
<ul>
<li>WordPress: 2.1 to 2.5.1 (2.5.1 is the latest version at the time of this post)</li>
<li>PHP: 4 or 5 (tested as far back as 4.4.6 and up to 5.2.6)</li>
<li>OpenSSL (initial keypair generation is handled by direct calls, while decryption is handled by built-in PHP functions)</li>
</ul>
<p>All tests were performed on various Linux servers. PHP&#8217;s program execution <a href="http://php.net/manual/en/ref.exec.php">functions</a> need to be enabled for the initial keypair generation (<a href="http://php.net/safe+mode">safe mode</a> should also be disabled for this). After the keypair is generated, it&#8217;s safe to go ahead and re-disable these functions and/or re-enable safe mode. Everyday use of this plugin relies on PHP&#8217;s built-in openssl functions.</p>
<p><span style="text-decoration: underline;"><strong>Update (6/13/08)</strong></span><br />
As of v1.1.0, keypair generation will work even if safe mode is enabled or the PHP execution fuctions have been disabled.  This alternative keypair generation mode will only work if you&#8217;re running PHP 5.2.0 or greater, however.</p>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2008/05/30/semisecure-login-reimagined/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>WordPress 2.3</title>
		<link>http://moggy.laceous.com/2007/10/10/wordpress-23/</link>
		<comments>http://moggy.laceous.com/2007/10/10/wordpress-23/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 18:00:08 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[hemingway]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/2007/10/10/wordpress-23/</guid>
		<description><![CDATA[Well, I decided to go ahead &#38; take the plunge. Moggylaceous is now running WordPress v2.3. For the most part it went very smoothly (including importing my UTW tags), but there were a few issues. The biggest change is that there&#8217;s no more Ultimate Tag Warrior. The new built-in tagging functions do most of what [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I decided to go ahead &amp; take the plunge.  Moggylaceous is now running WordPress v2.3.</p>
<p>For the most part it went very smoothly (including importing my UTW tags), but there were a few issues.</p>
<p>The biggest change is that there&#8217;s no more Ultimate Tag Warrior.  The new built-in tagging functions do most of what I wanted.  However, the one thing that seemed to be missing was an option to get related posts based on the tags used.  I found <a href="http://www.solo-technology.com/blog/2007/09/27/wordpress-23-and-tagging/">this</a> great post on the tagging plugins available for v2.3.  Apparently there&#8217;s supposed to be a <a href="http://www.neato.co.nz/archives/2007/09/25/ultimate-tag-warrior-please-read/">plugin</a> for UTW template tag compatibility, but it hasn&#8217;t been released yet.  Ultimately, I decided to go with the <a href="http://www.herewithme.fr/wordpress-plugins/simple-tags">Simple Tags</a> plugin.</p>
<p>The main thing that actually broke was HemingwayEx&#8217;s get_asides_category_id function.  Since the database structure has <a href="http://codex.wordpress.org/index.php?title=Version_2.3:New_Taxonomy">changed</a>, I had to edit this function.  It was pretty simple though.  Simply change: cat_ID –&gt; term_ID, categories –&gt; terms, &amp; cat_name –&gt; name.</p>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2007/10/10/wordpress-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paging The HemingwayEx Home Page</title>
		<link>http://moggy.laceous.com/2007/07/29/paging-the-hemingwayex-home-page/</link>
		<comments>http://moggy.laceous.com/2007/07/29/paging-the-hemingwayex-home-page/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 06:34:44 +0000</pubDate>
		<dc:creator>moggy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[hemingway]]></category>
		<category><![CDATA[paging]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://moggy.laceous.com/2007/07/29/paging-the-hemingwayex-home-page/</guid>
		<description><![CDATA[By default, the HemingwayEx theme only shows 2 posts on the home page. This is all well &#38; good except for the fact that you can&#8217;t use the paging (next &#38; previous) links on your home page to show older posts as well. If you want to get the paging links working, then here&#8217;s 3 [...]]]></description>
			<content:encoded><![CDATA[<p>By default, the <a href="http://nalinmakar.com/hemingwayex">HemingwayEx</a> theme only shows 2 posts on the home page.  This is all well &amp; good except for the fact that you can&#8217;t use the paging (<a href="http://codex.wordpress.org/Template_Tags/next_post_link">next</a> &amp; <a href="http://codex.wordpress.org/Template_Tags/previous_post_link">previous</a>) links on your home page to show older posts as well.</p>
<p>If you want to get the paging links working, then here&#8217;s 3 steps to achieve that goal.</p>
<p><strong><u>Step #1:</u></strong></p>
<p>Create a new PHP file (you can do this easily with a simple text editor like Notepad). Name it <strong>custom_hem_home_query.php</strong>.  Now copy &amp; paste the following code into it.</p>
<pre>&lt;?php

/*
 * Plugin Name: Custom HemingwayEx Home Query
 * Plugin URI: http://moggy.laceous.com/2007/07/29/paging-the-hemingwayex-home-page/
 * Description: Gives you the ability to use the paging links on your homepage
 * Version: 0.1
 * Author: Moggy
 * Author URI: http://moggy.laceous.com
 */

add_filter('query_string', 'custom_hem_home_query');

function custom_hem_home_query($query_string) {
	global $wp_query;
	$wp_query-&gt;parse_query($query_string);
	if ($wp_query-&gt;is_home) {
		global $hemingwayEx;
		$category_id = $hemingwayEx-&gt;get_asides_category_id();
		if (is_null($category_id)) {
			$query_string .= '&amp;posts_per_page=2';
		}
		else {
			$query_string .= '&amp;posts_per_page=2&amp;cat=-' . $category_id;
		}
	}
	return $query_string;
}

?&gt;</pre>
<p>Save the file &amp; upload it to your wp-content/plugins folder.  When you&#8217;re ready&#8230; activate the plugin.</p>
<p><strong><u>Step #2:</u></strong></p>
<p>Now we have to remove the custom query from the wp-content/themes/hemingwayEx index.php file.  Find the following code in the index.php file:</p>
<pre>// Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
$category_id = $hemingwayEx-&gt;get_asides_category_id();
is_null($category_id) ? query_posts('showposts=2') : query_posts('showposts=2&amp;cat=-' . $category_id);</pre>
<p>Simply comment out those lines so it looks like this:</p>
<pre>// Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
//$category_id = $hemingwayEx-&gt;get_asides_category_id();
//is_null($category_id) ? query_posts('showposts=2') : query_posts('showposts=2&amp;cat=-' . $category_id);</pre>
<p><strong><u>Step #3:</u></strong></p>
<p>Now you just need to add the paging links to your index.php file.  Something like this should work:</p>
<pre>&lt;div class="navigation"&gt;
  &lt;?php next_posts_link('&amp;laquo; Previous Entries') ?&gt;
  &lt;?php previous_posts_link('Next Entries &amp;raquo;') ?&gt;
&lt;/div&gt;</pre>
<p><strong><u>One final note:</u></strong></p>
<p>You could also wrap the code from steps 2 &amp; 3 with an if statement like the following if you want to be able to dynamically enable &amp; disable the plugin.</p>
<pre>if (function_exists('custom_hem_home_query')) {
  // put code here
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://moggy.laceous.com/2007/07/29/paging-the-hemingwayex-home-page/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced) (user agent is rejected)

Served from: moggy.laceous.com @ 2010-09-10 19:14:36 -->