WordPress.org

Ready to get started?Download WordPress

Forums

RePress
[resolved] Obfuscate URLs not working (fix) (2 posts)

  1. mhume
    Member
    Posted 2 years ago #

    Hi
    Problem:
    When Obfuscate URLs is checked all my links from the my repress permalink are un-obfuscated. When i click on one all i get is a blank screen (0.1alpha14).

    Reason:
    Obfuscate URLs relies on a randomly generated secret key (password) that is generated when you activate the plugin and is then stored on your wordpress db. The character range of the characters of the secret generated is between 0 and 255 (the extended ascii range). This includes many control characters that, in my case and maybe yours, can't be stored correctly in the wordpress db.

    Solution:
    Modify the repress_make_secret function in repress.php to the following: Make sure you deactivate then reactivate the plugin after making these changes to generate another secret key. You will also need to turn Obfuscate URLs on again in the settings!

    // Generate secret key to use in hashing functions.
    function repress_make_secret() {
    
    	mt_srand(make_seed());
    
    	$secret = '';
    	$secret_len = mt_rand(8, 12);
    	for ($i = 0; $i < $secret_len; $i++) {
    		$secret .= chr(mt_rand(32, 126));
    	}
    	return $secret;
    }

    This modified function creates a secret key that is between 8 and 12 characters long using only the standard keyboard letters, numbers and punctuation marks i.e. no control characters

    This sorted out Obfuscate for me, hope it does for you too!
    mh

    http://wordpress.org/extend/plugins/repress/

  2. mhume
    Member
    Posted 2 years ago #

    resolved in 0.1alpha15
    mh

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic