diff --git a/wp-content/plugins/wp-recaptcha/LICENSE b/wp-content/plugins/wp-recaptcha/LICENSE deleted file mode 100644 index 5cb775f9a48b57e47f7a424e9e9bc213fb45d412..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2008 reCAPTCHA -- http://recaptcha.net -AUTHORS: - Mike Crawford - Ben Maurer - Jorge Pe�a - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - * -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - * -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/wp-content/plugins/wp-recaptcha/email.png b/wp-content/plugins/wp-recaptcha/email.png deleted file mode 100644 index 7348aed77fe6a64c2210a202f12c6eccae7fcf24..0000000000000000000000000000000000000000 Binary files a/wp-content/plugins/wp-recaptcha/email.png and /dev/null differ diff --git a/wp-content/plugins/wp-recaptcha/mailhide.php b/wp-content/plugins/wp-recaptcha/mailhide.php deleted file mode 100644 index 0d77e2ec4db05d254ffb05fab6e34c5256f3bac7..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/mailhide.php +++ /dev/null @@ -1,349 +0,0 @@ -<?php - -require_once('wp-plugin.php'); - -if (!class_exists('MailHide')) { - class MailHide extends WPPlugin { - // member variables - private $mcrypt_loaded; - - function MailHide($options_name) { - $args = func_get_args(); - call_user_func_array(array(&$this, "__construct"), $args); - } - - function __construct($options_name) { - // instantiate super class (sets: options, environment, options_name) - parent::__construct($options_name); - - $this->register_default_options(); - - // require the recaptcha library - $this->require_library(); - - // verify mcrypt is loaded - $this->verify_mcrypt(); - - // register the hooks - $this->register_actions(); - $this->register_filters(); - - // keep this in the arsenal just in case - // disable the make_clickable filter cause it screws things up - /* - if ($this->mailhide_enabled()) { - remove_filter('comment_text', 'make_clickable', 9); - }*/ - } - - function register_actions() { - // load the plugin's textdomain for localization - add_action('init', array(&$this, 'load_textdomain')); - - // options - register_activation_hook(WPPlugin::path_to_plugin_directory() . '/wp-recaptcha.php', array(&$this, 'register_default_options')); // this way it only happens once, when the plugin is activated - add_action('admin_init', array(&$this, 'register_settings_group')); - add_action('admin_init', array(&$this, 'settings_section')); - - // admin notice - add_action('admin_notices', array(&$this, 'missing_mcrypt_notice')); - add_action('admin_notices', array(&$this, 'missing_keys_notice')); - } - - function register_filters() { - // add the filters only if mcrypt is loaded - if ($this->mcrypt_loaded) { - if ($this->options['use_in_posts']) - add_filter('the_content', array(&$this, 'mailhide_emails'), 9000); - - if ($this->options['use_in_comments']) - add_filter('comment_text', array(&$this, 'mailhide_emails'), 9000); - - // todo: this seems like it doesn't work: http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content_rss - // instead check for is_feed() on 'the_content' filter - // the_excerpt_rss filter works fine - // concern: it seems like the feeds still show the email encoded in CDATA - if ($this->options['use_in_rss']) { - add_filter('the_content_rss', array(&$this, 'mailhide_emails'), 9000); - add_filter('the_excerpt_rss', array(&$this, 'mailhide_emails'), 9000); // this one is sometimes used instead - } - - // todo: atom requires the html to be escaped, rss does not. do so accordingly in the preg_replace_callbacks - // todo: also be sure to escape replace_link_with - // - use htmlentities($var, ENT_QUOTES); for escaping? - if ($this->options['use_in_rss_comments']) - add_filter('comment_text_rss', array(&$this, 'mailhide_emails'), 9000); - } - } - - function mailhide_enabled() { - return ($this->options['use_in_posts'] || $this->options['use_in_comments'] || $this->options['use_in_rss'] || $this->options['use_in_rss_comments']); - } - - function keys_missing() { - return (empty($this->options['public_key']) || empty($this->options['private_key'])); - } - - function create_error_notice($message, $anchor = '') { - $options_url = admin_url('options-general.php?page=wp-recaptcha/recaptcha.php') . $anchor; - $error_message = sprintf(__($message . ' <a href="%s" title="WP-reCAPTCHA Options">Fix this</a>', 'recaptcha'), $options_url); - - echo '<div class="error"><p><strong>' . $error_message . '</strong></p></div>'; - } - - function missing_mcrypt_notice() { - if ($this->mailhide_enabled() && !$this->mcrypt_loaded) { - $this->create_error_notice('You enabled MailHide but the mcrypt PHP extension does not seem to be loaded.', '#mailhide'); - } - } - - // todo: make a check in mailhide_settings partial so that if the keys are missing, the appropriate box is highlighted with #FFFFE0 bg-color 1px solid #E6DB55 border - function missing_keys_notice() { - if ($this->mailhide_enabled() && $this->keys_missing()) { - $this->create_error_notice('You enabled MailHide, but some of the MailHide API Keys seem to be missing.', '#mailhide'); - } - } - - function settings_section() { - add_settings_section('mailhide_options', '', array(&$this, 'show_settings_section'), 'recaptcha_options_page'); - } - - function show_settings_section() { - include('mailhide_settings.php'); - } - - function verify_mcrypt() { - $this->mcrypt_loaded = extension_loaded('mcrypt'); - } - - // require the recaptcha library - function require_library() { - require_once(WPPlugin::path_to_plugin_directory() . '/recaptchalib.php'); - } - - function load_textdomain() { - load_plugin_textdomain('recaptcha', false, 'languages'); - } - - function register_default_options() { - if ($this->options) - return; - - $option_defaults = array(); - - $old_options = WPPlugin::retrieve_options("recaptcha"); - - if ($old_options) { - // keys - $option_defaults['public_key'] = $old_options['mailhide_pub']; // mailhide public key - $option_defaults['private_key'] = $old_options['mailhide_priv']; // mailhide private key - - // placement - $option_defaults['use_in_posts'] = $old_options['use_mailhide_posts']; // mailhide for posts/pages - $option_defaults['use_in_comments'] = $old_options['use_mailhide_comments']; // use mailhide for comments - $option_defaults['use_in_rss'] = $old_options['use_mailhide_rss']; // use mailhide for the rss feed of the posts/pages - $option_defaults['use_in_rss_comments'] = $old_options['use_mailhide_rss_comments']; // use mailhide for the rss comments - - // bypass levels - $option_defaults['bypass_for_registered_users'] = ($old_options['mh_bypass'] == "on") ? 1 : 0; // whether to sometimes skip the MailHide filter for registered users - $option_defaults['minimum_bypass_level'] = $old_options['mh_bypasslevel']; // who can see full emails normally (should be a valid WordPress capability slug) - - if ($option_defaults['minimum_bypass_level'] == "level_10") { - $option_defaults['minimum_bypass_level'] = "activate_plugins"; - } - - // styling - $option_defaults['replace_link_with'] = $old_options['mh_replace_link']; // name the link something else - $option_defaults['replace_title_with'] = $old_options['mh_replace_title']; // title of the link - } - - else { - // keys - $option_defaults['public_key'] = ''; // mailhide public key - $option_defaults['private_key'] = ''; // mailhide private key - - // placement - $option_defaults['use_in_posts'] = 0; // mailhide for posts/pages - $option_defaults['use_in_comments'] = 0; // use mailhide for comments - $option_defaults['use_in_rss'] = 0; // use mailhide for the rss feed of the posts/pages - $option_defaults['use_in_rss_comments'] = 0; // use mailhide for the rss comments - - // bypass levels - $option_defaults['bypass_for_registered_users'] = 0; // whether to sometimes skip the MailHide filter for registered users - $option_defaults['minimum_bypass_level'] = 'read'; // who can see full emails normally (should be a valid WordPress capability slug) - - // styling - $option_defaults['replace_link_with'] = ''; // name the link something else - $option_defaults['replace_title_with'] = ''; // title of the link - } - - // add the option based on what environment we're in - WPPlugin::add_options($this->options_name, $option_defaults); - } - - function register_settings_group() { - register_setting('mailhide_options_group', 'mailhide_options', array(&$this, 'validate_options')); - } - - function validate_dropdown($array, $key, $value) { - // make sure that the capability that was supplied is a valid capability from the drop-down list - if (in_array($value, $array)) - return $value; - else // if not, load the old value - return $this->options[$key]; - } - - function validate_options($input) { - // keys - $validated['public_key'] = trim($input['public_key']); // mailhide public key - $validated['private_key'] = trim($input['private_key']); // mailhide private key - - // placement - $validated['use_in_posts'] = ($input['use_in_posts'] == 1 ? 1 : 0); // mailhide for posts/pages - $validated['use_in_comments'] = ($input['use_in_comments'] == 1 ? 1 : 0); // use mailhide for comments - $validated['use_in_rss'] = ($input['use_in_rss'] == 1 ? 1 : 0); // use mailhide for the rss feed of the posts/pages - $validated['use_in_rss_comments'] = ($input['use_in_rss_comments'] == 1 ? 1 : 0); // use mailhide for the rss comments - - $capabilities = array('read', 'edit_posts', 'publish_posts', 'moderate_comments', 'activate_plugins'); - - // bypass levels - $validated['bypass_for_registered_users'] = ($input['bypass_for_registered_users'] == 1 ? 1: 0); // whether to sometimes skip the MailHide filter for registered users - $validated['minimum_bypass_level'] = $this->validate_dropdown($capabilities, 'minimum_bypass_level', $input['minimum_bypass_level']); // who can see full emails normally (should be a valid WordPress capability slug) - - // styling - $validated['replace_link_with'] = $input['replace_link_with']; // name the link something else - $validated['replace_title_with'] = $input['replace_title_with']; // title of the link - - return $validated; - } - - function build_dropdown($name, $keyvalue, $checked_value) { - echo '<select name="' . $name . '" id="' . $name . '">' . "\n"; - - foreach ($keyvalue as $key => $value) { - if ($value == $checked_value) - $checked = ' selected="selected" '; - - echo '\t <option value="' . $value . '"' . $checked . ">$key</option> \n"; - $checked = NULL; - } - - echo "</select> \n"; - } - - function capabilities_dropdown() { - // define choices: Display text => permission slug - $capabilities = array( - __('all registered users', 'recaptcha') => 'read', - __('edit posts', 'recaptcha') => 'edit_posts', - __('publish posts', 'recaptcha') => 'publish_posts', - __('moderate comments', 'recaptcha') => 'moderate_comments', - __('activate plugins', 'recaptcha') => 'activate_plugins' - ); - - $this->build_dropdown('mailhide_options[minimum_bypass_level]', $capabilities, $this->options['minimum_bypass_level']); - } - - function mailhide_emails($content) { - global $user_ID; - - // set the minimum capability needed to skip the MailHide if there is one - if ($this->options['bypass_for_registered_users'] && $this->options['minimum_bypass_level']) - $needed_capability = $this->options['minimum_bypass_level']; - - // skip the MailHide display if the minimum capability is met - // todo: only 'use in comments' is checked, have to check each of them? - // todo: wait, is that necessary? the filter isn't even added if that field is false, removed - - if ($needed_capability && current_user_can($needed_capability)) { - // remove the nohides - $content = preg_replace('/\[\/?nohide\]/i','',$content); - return $content; - } - - // Regular Expressions thanks to diabolic from EFNet #regex - - // match hyperlinks with emails - $regex = '/(?!\[nohide\])<a[^>]*href="((?:mailto:)?([^@"]+@[^@"]+))"[^>]*>(.+?)<\/a>(?!\[\/nohide\])/i'; - $content = preg_replace_callback($regex, array(&$this, "replace_hyperlinked"), $content); - - // match emails - // this seems to no longer be necessary because wordpress automatically linkifies all plaintext emails - $regex = '/\b([\w.+-]+@[a-z\d.-]+\.[a-z]{2,6})\b(?!\s*\[\/nohide\]|(?:(?!<a[^>]*>).)*<\/a>)/i'; - $content = preg_replace_callback($regex, array(&$this, "replace_plaintext"), $content); - - // remove the nohides - $content = preg_replace('/\[\/?nohide\]/i','',$content); - - return $content; - } - - // replace the hyperlinked emails i.e. <a href="haha@lol.com">this</a> or <a href="mailto:haha@lol.com">that</a> - function replace_hyperlinked($matches) { - $html = ""; - $email = $matches[2]; - $text = $matches[3]; - - if ($email == $text) { - // employ the use of email parts instead - $html = recaptcha_mailhide_html($this->options['public_key'], $this->options['private_key'], $email); - - // style it - $html = '<span class="mh-email">' . $html . "</span>"; - } - - else { - // get the url, the part inside the href. this is the email of course - $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $email); - - // construct a new hyperlink with the url hidden but the link text the same - $html = "<a href='" . $url . "' onclick=\"window.open('" . htmlentities ($url, ENT_QUOTES) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\">" . $text . "</a>"; - - // style it - $html = '<span class="mh-hyperlinked">' . $html . "</span>"; - } - - return $html; - } - - // replace the plain text emails i.e. haha@lol.com - function replace_plaintext($matches) { - if ($this->options['replace_link_with'] == "" && $this->options['replace_title_with'] == "") { - // find plain text emails and hide them - $html = recaptcha_mailhide_html($this->options['public_key'], $this->options['private_key'], $matches[0]); - } - - else { - // replace both things - if ($this->options['replace_link_with'] != "" && $this->options['replace_title_with'] != "") { - $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]); - $html = "<a href='" . htmlentities($url, ENT_QUOTES) . - "' onclick=\"window.open('" . htmlentities($url, ENT_QUOTES) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"" . $this->options['replace_title_with'] . "\">" . $this->options['replace_link_with'] . "</a>"; - } - - // only replace the link - else if ($this->options['replace_link_with'] != "" && $this->options['replace_title_with'] == "") { - $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]); - $html = "<a href='" . htmlentities($url, ENT_QUOTES) . - "' onclick=\"window.open('" . htmlentities($url, ENT_QUOTES) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">" . $this->options['replace_link_with'] . "</a>"; - } - - // only replace the title - else if ($this->options['replace_link_with'] == "" && $this->options['replace_title_with'] != "") { - $url = recaptcha_mailhide_url($this->options['public_key'], $this->options['private_key'], $matches[0]); - $emailparts = _recaptcha_mailhide_email_parts ($matches[0]); - - $html = htmlentities($emailparts[0], ENT_QUOTES) . "<a href='" . htmlentities($url, ENT_QUOTES) . - "' onclick=\"window.open('" . htmlentities($url, ENT_QUOTES) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"" . $recaptcha_opt['replace_title_with'] . "\">...</a>@" . htmlentities($emailparts[0], ENT_QUOTES); - } - } - - // style it - $html = '<span class="mh-email">' . $html . "</span>"; - - return $html; - } - } // end class declaration -} // end class exists clause - -?> \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/mailhide_settings.php b/wp-content/plugins/wp-recaptcha/mailhide_settings.php deleted file mode 100644 index 76229d957e5a380475afd74cf5308c7f0087f1cc..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/mailhide_settings.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php - - if (defined('ALLOW_INCLUDE') === false) - die('no direct access'); - -?> - -<a name="mailhide"></a> -<h2><?php _e('MailHide Options', 'recaptcha'); ?></h2> -<p><?php _e('One common misconception about MailHide is that it edits your email addresses on the database. This is false, your actual content is never actually modified. Instead, it is "filtered" such that it appears modified to the reader.', 'recaptcha'); ?></p> - -<form method="post" action="options.php"> - <?php settings_fields('mailhide_options_group'); ?> - - <h3><?php _e('Authentication', 'recaptcha'); ?></h3> - <p><?php _e('These keys are required before you are able to do anything else.', 'recaptcha'); ?> <?php _e('You can get the keys', 'recaptcha'); ?> <a href="http://mailhide.recaptcha.net/apikey" title="<?php _e('Get your reCAPTCHA API Keys', 'recaptcha'); ?>"><?php _e('here', 'recaptcha'); ?></a>.</p> - <p><?php _e('Be sure not to mix them up! The public and private keys are not interchangeable!'); ?></p> - - <table class="form-table"> - <tr valign="top"> - <th scope="row"><?php _e('Public Key', 'recaptcha'); ?></th> - <td> - <input type="text" name="mailhide_options[public_key]" size="40" value="<?php echo $this->options['public_key']; ?>" /> - </td> - </tr> - <tr valign="top"> - <th scope="row"><?php _e('Private Key', 'recaptcha'); ?></th> - <td> - <input type="text" name="mailhide_options[private_key]" size="40" value="<?php echo $this->options['private_key']; ?>" /> - </td> - </tr> - </table> - - <h3><?php _e('General Options', 'recaptcha'); ?></h3> - <table class="form-table"> - <tr valign="top"> - <th scope="row"><?php _e('Use MailHide in', 'recaptcha'); ?></th> - <td> - <input type="checkbox" id="mailhide_options[use_in_posts]" name="mailhide_options[use_in_posts]" value="1" <?php checked('1', $this->options['use_in_posts']); ?> /> - <label for="mailhide_options[use_in_posts]"><?php _e('Posts and Pages', 'recaptcha'); ?></label><br /> - - <input type="checkbox" id="mailhide_options[use_in_comments]" name="mailhide_options[use_in_comments]" value="1" <?php checked('1', $this->options['use_in_comments']); ?> /> - <label for="mailhide_options[use_in_comments]"><?php _e('Comments', 'recaptcha'); ?></label><br /> - - <input type="checkbox" id="mailhide_options[use_in_rss]" name="mailhide_options[use_in_rss]" value="1" <?php checked('1', $this->options['use_in_rss']); ?> /> - <label for="mailhide_options[use_in_rss]"><?php _e('RSS Feed of Posts and Pages', 'recaptcha'); ?></label><br /> - - <input type="checkbox" id="mailhide_options[use_in_rss_comments]" name="mailhide_options[use_in_rss_comments]" value="1" <?php checked('1', $this->options['use_in_rss_comments']); ?> /> - <label for="mailhide_options[use_in_rss_comments]"><?php _e('RSS Feed of Comments', 'recaptcha'); ?></label><br /> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Target', 'recaptcha'); ?></th> - <td> - <input type="checkbox" id="mailhide_options[bypass_for_registered_users]" name="mailhide_options[bypass_for_registered_users]" value="1" <?php checked('1', $this->options['bypass_for_registered_users']); ?> /> - <label for="mailhide_options[bypass_for_registered_users]"><?php _e('Show actual email addresses to Registered Users who can', 'recaptcha'); ?></label> - <?php $this->capabilities_dropdown(); ?> - </td> - </tr> - </table> - - <h3><?php _e('Presentation', 'recaptcha'); ?></h3> - <table class="form-table"> - <tr valign="top"> - <th scope="row"><?php _e('Replace Link With', 'recaptcha'); ?></th> - <td> - <input type="text" name="mailhide_options[replace_link_with]" size="70" value="<?php echo $this->options['replace_link_with']; ?>" /> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Replace Title With', 'recaptcha'); ?></th> - <td> - <input type="text" name="mailhide_options[replace_title_with]" size="70" value="<?php echo $this->options['replace_title_with']; ?>" /> - </td> - </tr> - </table> - - <h3><?php _e('Styling', 'recaptcha'); ?></h3> - <p>You can style hidden emails using a variety of classes. Style the classes in your theme's stylesheet and be sure to clear any caches you might have to see the results.</p> - - <ul> - <li><strong>.mh-email</strong> is assigned to the complete email</li> - <li><strong>.mh-first</strong> is assigned to the first part of the email</li> - <li><strong>.mh-middle</strong> is assigned to the middle of the email (the link)</li> - <li><strong>.mh-last</strong> is assigned to the last part of the email</li> - </ul> - - <p>The following is an example of the structure:</p> - - <code> - <span class="mh-email"> <br \> - <span class="mh-first">jorg</span> <br \> - <a href="url" class="mh-middle">...</a> <br \> - <span class="mh-last">@gmail.com</span> <br \> - </span> - </code> - - <p class="submit"><input type="submit" class="button-primary" title="<?php _e('Save MailHide Options') ?>" value="<?php _e('Save MailHide Changes') ?> »" /></p> -</form> \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/readme.txt b/wp-content/plugins/wp-recaptcha/readme.txt deleted file mode 100644 index 12b18f40c83bcdb59ad7541c19e411ffc1ae81b1..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/readme.txt +++ /dev/null @@ -1,126 +0,0 @@ -=== Plugin Name === -Contributors: recaptchanet -Tags: comments, registration, recaptcha, antispam, captcha -Requires at least: 2.7 -Tested up to: 2.9.1 -Stable tag: 4.1 - -Integrates reCAPTCHA anti-spam methods with WordPress including comment and registration spam protection. - -== Description == - -What is reCAPTCHA? - -reCAPTCHA is a free CAPTCHA service that protects your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human; a CAPTCHA is a Completely Automated Public Turing test to tell Computers and Human Apart. reCAPTCHA comes in the form of a widget that you can easily add to your blog, forum, registration form, etc. - -In addition to protecting your site, reCAPTCHA also helps us digitize old books and newspapers, transcribe street numbers and solve hard AI problems. [Learn how reCAPTCHA works](http://www.google.com/recaptcha) and join our [forum](https://groups.google.com/forum/#!forum/recaptcha). - -== Installation == - -To install in regular WordPress and [WordPress MultiSite](http://codex.wordpress.org/Create_A_Network): - -1. Upload the `wp-recaptcha` folder to the `/wp-content/plugins/` directory -2. Activate the plugin through the `Plugins` menu in WordPress -3. Get the reCAPTCHA keys [here](https://www.google.com/recaptcha/admin#whyrecaptcha). - -== Requirements == - -* You need the reCAPTCHA keys [here](https://www.google.com/recaptcha/admin#whyrecaptcha). -* Your theme must have a `do_action('comment_form', $post->ID);` call right before the end of your form (*Right before the closing form tag*). Most themes do. - -== ChangeLog == - -= Version 4.0 -* Upgrade to reCAPTCHA V2. -* Increase supported languages to 40+. -= Version 3.2 -* Transferred ownership back to Google -= Version 3.1.6 = -* WordPress MS fixes. Should now work out of the box at the individual blog level. Thanks to [huyz](http://huyz.us/) -* NOTICE: If anyone is interested in taking up development of this plugin, please contact me at blaenk@gmail.com. -= Version 3.1.5 = -* Thanks to [Ken Newman](https://github.com/WraithKenny) for these changes -* Update author website -* Stop generating javascript errors on unnecessary pages -* Better SSL support -= Version 3.1.4 = -* Fixed an XSS vulnerability -= Version 3.1.3 = -* Added a collision aversion prefix to the Plugin class. bbouton from github alerted me to a collision between WP-reCAPTCHA's plugin class and the JW Player Plugin's Plugin class. -= Version 3.1.2 = -* Fixed option migration. The plugin was actually written to be made to import the old options, but the hook that functionality was registered to does not fire when the wordpress interface updates a plugin, only when a plugin is updated manually. Now the plugin will import or register default options as long as the options don't already exist. -* Fixed a case where recaptcha theme would not change. This happened because of the above problem, creating a situation in which the tab index field could be empty, and being empty this then caused a problem with the recaptcha options when they were output to the page. If you're running version 3.0 of the plugin, go ahead and add a number to the tab index (e.g. 5 for comments, 30 for registration), if not, this plugin should automatically fix it next time you change save the settings. -* Modified the options page submit buttons to more explicitly show that they are specific to their own respective sections, that is, one button ONLY saves the changes for one reCAPTCHA, and the other ONLY saves the changes for MailHide. -= Version 3.0 = -* Rewrote the entire plugin in an object-oriented manner with separation of concerns in mind to increase maintainability and extensibility -* Implemented the ability to import the options from the option set of older versions of the plugin, such as 2.9.8.2 and less -* Redesigned the options page for the plugin, now using newer wordpress options/form functionality with support for input-validation -* Options for recaptcha and mailhide are independent of each other -* Added support for localization, using gettext -* Fixed the issue where comments would not be saved if the reCAPTCHA was entered incorrectly (or not entered at all). requires javascript -* Fixed an issue where saved comments (from bad reCAPTCHA response) would replace double quotes with backslashes -* Fixed an issue in wordpress 3 and above in which mailhide would not work due to interference with a new filter, make_clickable, which auto-links emails and URLs -* Fixed a role-check issue in wordpress 3 and above. level_10 (and all levels for that matter) have been deprecated. now using activate_plugins instead. -= Version 2.9.8.2 = -* Fixed a bug with WordPress 3.0 Multi-Site -= Version 2.9.8 = -* Added support for WordPress 3.0 Multi-Site thanks to Tom Lynch -= Version 2.9.7 = -* Fixed a relatively new [critical bug](http://www.blaenkdenum.com/2010/03/recaptcha-marking-all-comments-as-spam/) which marked new comments as spam regardless of reCAPTCHA response -= Version 2.9.6 = -* Fixed a careless bug affecting custom hidden emails -* Fixed broken links in readme.txt -= Version 2.9.5 = -* Added flexibility to the enabling of MailHide. Can now separately choose to enable/disable MailHide for posts/pages, comments, RSS feed of posts/pages, and RSS feed of comments -* Fixed an ['endless redirection' bug](http://wordpress.org/support/topic/245154?replies=1 "endless redirection in wp-reCAPTCHA options form") thanks to Edilton Siqueira -* Fixed a bug in WPMU where wp-admin/user-new.php kept trying to validate the user registration with reCAPTCHA information despite not having shown the reCAPTCHA form, thanks to [Daniel Collis-Puro](http://blogs.law.harvard.edu/ "Weblogs at Harvard Law School") for letting me know -* Added a line break after the reCAPTCHA form to add some padding space between it and the submit button. Due to [popular demand](http://www.chriscredendino.com/2009/03/08/adding-space-between-recaptcha-and-the-comment-submit-button-on-wordpress/ "Adding space between reCAPTCHA and the comment Submit Button on WordPress") -* Fixed a validation problem where a style attribute was missing. Thanks to [nv1962](http://wordpress.org/support/profile/304093 "nv1962's profile") -* Public and Private keys are now trimmed since they are usually pasted from the recaptcha site, to avoid any careless errors -* Fixed the regular expressions for matching the emails, email@provider.co.uk type emails now work -= Version 2.9.4 = -* Fixed a bug where the comment would not be saved if the CAPTCHA wasn't entered correctly. Thanks to Justin Heideman. -= Version 2.9.3 = -* Fixed the `recaptcha_wp_saved_comment` function. Thanks to Tomi M. -= Version 2.9.2 = -* 'Beautified' the options page. -* Added two options to allow users to enter their own custom error messages. Also good for foreign language support. -* Fixed a conflict bug with the OpenID plugin where the reCAPTCHA form would show under the OpenID section in the registration form. -* Added two new options which allow one to choose the text to be shown for all hidden Emails and/or the title of the link. -* Fixed a 'Could not open socket' error in recaptchalib.php. [Bug ID 26](http://code.google.com/p/recaptcha/issues/detail?id=26 "recaptchalib.php: Could not open socket (Fix included)") -* Fixed a WPMU issue where blog registrations weren't possible due to a redirection to the first step in the registration process. Thanks to [Edward](http://yisheng.wordpress.com/2008/08/14/wp-recaptcha-for-wpmu-26/ "Edward"). -= Version 2.9.1 = -* Forgot that if you can see emails in their true form, then you shouldn't have to see the [nohide][/nohide] tags either. Fixed. -= Version 2.8.6 = -* Administration interface is now integrated with 2.5's look and feel. Thanks to [Jeremy Clarke](http://simianuprising.com/ "Jeremy Clarke"). -* Users can now have more control over who sees the reCAPTCHA form and who can see emails in their true form (If MailHide is enabled). Thanks to [Jeremy Clarke](http://simianuprising.com/ "Jeremy Clarke"). -* Fixed a very stupid (**One character deal**) fatal error on most Windows Servers which don't support short tags (short_open_tag). I'm speaking of the so called 'Unexpected $end' error. -* Accommodated for the fact that in +2.6 the wp-content folder can be anywhere. - -== Frequently Asked Questions == - -= HELP, I'm still getting spam! = -There are four common issues that make reCAPTCHA appear to be broken: - -1. **Moderation Emails**: reCAPTCHA marks comments as spam, so even though the comments don't actually get posted, you will be notified of what is supposedly new spam. It is recommended to turn off moderation emails with reCAPTCHA. -1. **Akismet Spam Queue**: Again, because reCAPTCHA marks comments with a wrongly entered CAPTCHA as spam, they are added to the spam queue. These comments however weren't posted to the blog so reCAPTCHA is still doing it's job. It is recommended to either ignore the Spam Queue and clear it regularly or disable Akismet completely. reCAPTCHA takes care of all of the spam created by bots, which is the usual type of spam. The only other type of spam that would get through is human spam, where humans are hired to manually solve CAPTCHAs. If you still get spam while only having reCAPTCHA enabled, you could be a victim of the latter practice. If this is the case, then turning on Akismet will most likely solve your problem. Again, just because it shows up in the Spam Queue does NOT mean that spam is being posted to your blog, it's more of a 'comments that have been caught as spam by reCAPTCHA' queue. -1. **Trackbacks and Pingbacks**: reCAPTCHA can't do anything about pingbacks and trackbacks. You can disable pingbacks and trackbacks in Options > Discussion > Allow notifications from other Weblogs (Pingbacks and trackbacks). -1. **Human Spammers**: Believe it or not, there are people who are paid (or maybe slave labor?) to solve CAPTCHAs all over the internet and spam. This is the last and rarest reason for which it might appear that reCAPTCHA is not working, but it does happen. On this plugin's [page](http://www.blaenkdenum.com/wp-recaptcha/ "WP-reCAPTCHA - Blaenk Denum"), these people sometimes attempt to post spam to try and make it seem as if reCAPTCHA is not working. A combination of reCAPTCHA and Akismet might help to solve this problem, and if spam still gets through for this reason, it would be very minimal and easy to manually take care of. - -= Why am I getting Warning: pack() [function.pack]: Type H: illegal hex digit? -You have the keys in the wrong place. Remember, the reCAPTCHA keys are different from the MailHide keys. And the Public keys are different from the Private keys as well. You can't mix them around. Go through your keys and make sure you have them each in the correct box. - -= Aren't you increasing the time users spend solving CAPTCHAs by requiring them to type two words instead of one? = -Actually, no. Most CAPTCHAs on the Web ask users to enter strings of random characters, which are slower to type than English words. reCAPTCHA requires no more time to solve than most other CAPTCHAs. - -= Are reCAPTCHAs less secure than other CAPTCHAs that use random characters instead of words? = -Because we ask users to enter two words instead of one, we can increase the security of reCAPTCHA against programs that attempt to guess the words using a dictionary. Whenever an IP address fails one reCAPTCHA, we can show them more distorted words, and give them challenges for which we know both words. The probability of randomly guessing both words correctly would be less than one in ten million. - -= Are CAPTCHAs secure? I heard spammers are using porn sites to solve them: the CAPTCHAs are sent to a porn site, and the porn site users are asked to solve the CAPTCHA before being able to see a pornographic image. = - -CAPTCHAs offer great protection against abuse from automated programs. While it might be the case that some spammers have started using porn sites to attack CAPTCHAs (although there is no recorded evidence of this), the amount of damage this can inflict is tiny (so tiny that we haven't even seen this happen!). Whereas it is trivial to write a bot that abuses an unprotected site millions of times a day, redirecting CAPTCHAs to be solved by humans viewing pornography would only allow spammers to abuse systems a few thousand times per day. The economics of this attack just don't add up: every time a porn site shows a CAPTCHA before a porn image, they risk losing a customer to another site that doesn't do this. - -== Screenshots == - -1. The reCAPTCHA Settings -2. Comments page with reCAPTCHA diff --git a/wp-content/plugins/wp-recaptcha/recaptcha.css b/wp-content/plugins/wp-recaptcha/recaptcha.css deleted file mode 100644 index 00f43362d7021dcfff3413d25e7a420063a3c881..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/recaptcha.css +++ /dev/null @@ -1,72 +0,0 @@ -/* RECAPTCHA STYLING */ -.recaptcha-error { - font-size: 1.8em; - padding-bottom: 8px; -} -/* END RECAPTCHA STYLING */ - -/* MAILHIDE STYLING */ - -/* This is for plain text emails i.e. haha@lol.com - TEXT*/ -.mh-plaintext { - background:transparent url(email.png) no-repeat scroll left center; - border:medium none; - color:#2277DD; - height:16px; - padding:2px 2px 4px 20px; -} - -/* This is for plain text emails i.e. haha@lol.com - DOTS*/ -.mh-plaintext a, .mh-plaintext a:hover, .mh-plaintext a:visited, .mh-plaintext a:visited:hover { - color: #FF7700; - font-weight: bolder; - text-decoration: none; - border: 0; - background-color: transparent !important; -} - -/* This is for hyperlinked emails i.e. <a href="mailto:ohnoes@pwnies.com">TEXT</a> - TEXT*/ -.mh-hyperlinked { - background:transparent url(email.png) no-repeat scroll left center; - border:medium none; - color:#2277DD; - height:16px; - padding:2px 2px 4px 20px; -} - -/* This is for hyperlinked emails i.e. <a href="mailto:ohnoes@pwnies.com">TEXT</a> - DOTS*/ -.mh-hyperlinked a, .mh-hyperlinked a:hover, .mh-hyperlinked a:visited, .mh-hyperlinked a:visited:hover { - color: #FF7700; - font-weight: bolder; - text-decoration: none; - border: 0; -} -/* END MAILHIDE STYLING */ - -/* ADMINISTRATION SETTINGS RECAPTCHA */ -.lang-select label, .theme-select label { - vertical-align: middle !important; -} - -.lang-select select, .theme-select select { - vertical-align: middle !important; -} - -.recaptcha-form { - margin: auto !important; - width: 25em !important; -} - -.recaptcha-options td { - vertical-align: top !important; -} - -.which-key label { - font-weight: bold; -} - -.copyright { - text-align: center; - font-size: .85em; -} -/* END ADMINISTRATION SETTINGS RECAPTCHA */ \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/recaptcha.php b/wp-content/plugins/wp-recaptcha/recaptcha.php deleted file mode 100644 index 40541392b4ec6a9736502d69b0eb1cb14d4daefa..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/recaptcha.php +++ /dev/null @@ -1,471 +0,0 @@ -<?php -/** - * This is a PHP library that handles calling reCAPTCHA. - * - Documentation and latest version - * https://developers.google.com/recaptcha/docs/php - * - Get a reCAPTCHA API Key - * https://www.google.com/recaptcha/admin/create - * - Discussion group - * http://groups.google.com/group/recaptcha - * - * @link http://www.google.com/recaptcha - */ - -require_once('wp-plugin.php'); - -if (class_exists('ReCAPTCHAPlugin')) -{ - return; -} - -class ReCAPTCHAPlugin extends WPPlugin -{ - private $_saved_error; - private $_reCaptchaLib; - - /** - * Php 4 Constructor. - * - * @param string $options_name - */ - function ReCAPTCHAPlugin($options_name) { - $args = func_get_args(); - call_user_func_array(array(&$this, "__construct"), $args); - } - - /** - * Php 5 Constructor. - * - * @param string $options_name - */ - function __construct($options_name) { - parent::__construct($options_name); - $this->register_default_options(); - - // require the recaptcha library - $this->_require_library(); - - // register the hooks - $this->register_actions(); - $this->register_filters(); - } - - function register_actions() { - // load the plugin's textdomain for localization - add_action('init', array(&$this, 'load_textdomain')); - - // options - register_activation_hook(WPPlugin::path_to_plugin_directory() . - '/wp-recaptcha.php', - array(&$this, 'register_default_options')); - add_action('admin_init', array(&$this, 'register_settings_group')); - - if ($this->is_multi_blog()) { - add_action('signup_extra_fields', array(&$this, - 'show_recaptcha_in_registration')); - } else { - add_action('register_form', array(&$this, - 'show_recaptcha_in_registration')); - } - - add_action('comment_form', array(&$this, 'show_recaptcha_in_comments')); - - // recaptcha comment processing - add_action('wp_head', array(&$this, 'saved_comment'), 0); - add_action('preprocess_comment', array(&$this, 'check_comment'), 0); - add_action('comment_post_redirect', array(&$this, 'relative_redirect'), - 0, 2); - - // administration (menus, pages, notifications, etc.) - add_filter("plugin_action_links", array(&$this, 'show_settings_link'), - 10, 2); - - add_action('admin_menu', array(&$this, 'add_settings_page')); - // admin notices - add_action('admin_notices', array(&$this, 'missing_keys_notice')); - } - - function register_filters() { - if ($this->is_multi_blog()) { - add_filter('wpmu_validate_user_signup', - array(&$this, 'validate_recaptcha_response_wpmu')); - } else { - add_filter('registration_errors', array(&$this, - 'validate_recaptcha_response')); - } - } - - function load_textdomain() { - load_plugin_textdomain('recaptcha', false, 'languages'); - } - - // set the default options - function register_default_options() { - if ($this->options) - return; - $option_defaults = array(); - $old_options = WPPlugin::retrieve_options("recaptcha"); - if ($old_options) { - $option_defaults['site_key'] = $old_options['pubkey']; - $option_defaults['secret'] = $old_options['privkey']; - - // styling - $option_defaults['recaptcha_language'] = $old_options['re_lang']; - - // error handling - $option_defaults['no_response_error'] = $old_options['error_blank']; - } else { - $old_options = WPPlugin::retrieve_options($this->options_name); - if ($old_options) { - $option_defaults['site_key'] = $old_options['public_key']; - $option_defaults['secret'] = $old_options['private_key']; - $option_defaults['comments_theme'] = 'standard'; - $option_defaults['recaptcha_language'] = $old_options['recaptcha_language']; - $option_defaults['no_response_error'] = $old_options['no_response_error']; - } else { - $option_defaults['site_key'] = ''; - $option_defaults['secret'] = ''; - $option_defaults['comments_theme'] = 'standard'; - $option_defaults['recaptcha_language'] = 'en'; - $option_defaults['no_response_error'] = - '<strong>ERROR</strong>: Please fill in the reCAPTCHA form.'; - } - } - // add the option based on what environment we're in - WPPlugin::add_options($this->options_name, $option_defaults); - } - - // require the recaptcha library - private function _require_library() { - require_once($this->path_to_plugin_directory() . '/recaptchalib.php'); - } - - // register the settings - function register_settings_group() { - register_setting("recaptcha_options_group", 'recaptcha_options', - array(&$this, 'validate_options')); - } - - function keys_missing() { - return (empty($this->options['site_key']) || - empty($this->options['secret'])); - } - - function create_error_notice($message, $anchor = '') { - $options_url = admin_url( - 'options-general.php?page=wp-recaptcha/recaptcha.php') . $anchor; - $error_message = sprintf(__($message . - ' <a href="%s" title="WP-reCAPTCHA Options">Fix this</a>', - 'recaptcha'), $options_url); - echo '<div class="error"><p><strong>' . $error_message . - '</strong></p></div>'; - } - - function missing_keys_notice() { - if ($this->keys_missing()) { - $this->create_error_notice('reCAPTCHA API Keys are missing.'); - } - } - - function validate_dropdown($array, $key, $value) { - if (in_array($value, $array)) { - return $value; - } else { // if not, load the old value - return $this->options[$key]; - } - } - - function validate_options($input) { - // trim the spaces out of the key - $validated['site_key'] = trim($input['site_key']); - $validated['secret'] = trim($input['secret']); - - $themes = array ('standard', 'light', 'dark'); - $validated['comments_theme'] = $this->validate_dropdown($themes, - 'comments_theme', $input['comments_theme']); - $validated['recaptcha_language'] = $input['recaptcha_language']; - $validated['no_response_error'] = $input['no_response_error']; - return $validated; - } - // display recaptcha - function show_recaptcha_in_registration($errors) { - $escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES); - - // if it's for wordpress mu, show the errors - if ($this->is_multi_blog()) { - $error = $errors->get_error_message('captcha'); - echo '<label for="verification">Verification:</label>'; - echo ($error ? '<p class="error">' . $error . '</p>' : ''); - echo $this->get_recaptcha_html(); - } else { // for regular wordpress - echo $this->get_recaptcha_html(); - } - } - - function validate_recaptcha_response($errors) { - if (empty($_POST['g-recaptcha-response']) || - $_POST['g-recaptcha-response'] == '') { - $errors->add('blank_captcha', $this->options['no_response_error']); - return $errors; - } - - if ($this->_reCaptchaLib == null) { - $this->_reCaptchaLib = new ReCaptcha($this->options['secret']); - } - $response = $this->_reCaptchaLib->verifyResponse( - $_SERVER['REMOTE_ADDR'], - $_POST['g-recaptcha-response']); - - // response is bad, add incorrect response error - if (!$response->success) - $errors->add('captcha_wrong', $response->error); - - return $errors; - } - - function validate_recaptcha_response_wpmu($result) { - if (!$this->is_authority()) { - // blogname in 2.6, blog_id prior to that - // todo: why is this done? - if (isset($_POST['blog_id']) || isset($_POST['blogname'])) - return $result; - // no text entered - if (empty($_POST['g-recaptcha-response']) || - $_POST['g-recaptcha-response'] == '') { - $result['errors']->add('blank_captcha', - $this->options['no_response_error']); - return $result['errors']; - } - - if ($this->_reCaptchaLib == null) { - $this->_reCaptchaLib = new ReCaptcha($this->options['secret']); - } - $response = $this->_reCaptchaLib->verifyResponse( - $_SERVER['REMOTE_ADDR'], - $_POST['g-recaptcha-response']); - - // response is bad, add incorrect response error - if (!$response->success) { - $result['errors']->add('captcha_wrong', $response->error); - echo '<div class="error">' . $response->error . '</div>'; - } - return $result; - } - } - // utility methods - function hash_comment($id) { - define ("RECAPTCHA_WP_HASH_SALT", "b7e0638d85f5d7f3694f68e944136d62"); - if (function_exists('wp_hash')) - return wp_hash(RECAPTCHA_WP_HASH_SALT . $id); - else - return md5(RECAPTCHA_WP_HASH_SALT . $this->options['secret'] . $id); - } - - function get_recaptcha_html() { - return '<div class="g-recaptcha" data-sitekey="' . - $this->options['site_key'] . - '" data-theme="' . $this->options['comments_theme'] . - '"></div><script type="text/javascript"' . - 'src="https://www.google.com/recaptcha/api.js?hl=' . - $this->options['recaptcha_language'] . - '"></script>'; - } - - function show_recaptcha_in_comments() { - global $user_ID; - - //modify the comment form for the reCAPTCHA widget - add_action('wp_footer', array(&$this, 'save_comment_script')); - - $comment_string = <<<COMMENT_FORM - <div id="recaptcha-submit-btn-area"> </div> - <noscript> - <style type='text/css'>#submit {display:none;}</style> - <input name="submit" type="submit" id="submit-alt" tabindex="6" - value="Submit Comment"/> - </noscript> -COMMENT_FORM; - - $use_ssl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on"); - - $escaped_error = htmlentities($_GET['rerror'], ENT_QUOTES); - - echo $this->get_recaptcha_html() . $comment_string; - } - - // this is what does the submit-button re-ordering - function save_comment_script() { - $javascript = <<<JS - <script type="text/javascript"> - var sub = document.getElementById('submit'); - document.getElementById('recaptcha-submit-btn-area').appendChild (sub); - document.getElementById('submit').tabIndex = 6; - if ( typeof _recaptcha_wordpress_savedcomment != 'undefined') { - document.getElementById('comment').value = - _recaptcha_wordpress_savedcomment; - } - </script> -JS; - echo $javascript; - } - - function check_comment($comment_data) { - global $user_ID; - // do not check trackbacks/pingbacks - if ($comment_data['comment_type'] == '') { - if ($this->_reCaptchaLib == null) { - $this->_reCaptchaLib = new ReCaptcha($this->options['secret']); - } - $response = $this->_reCaptchaLib->verifyResponse( - $_SERVER['REMOTE_ADDR'], - $_POST['g-recaptcha-response']); - - if (!$response->success) { - $this->_saved_error = $response->error; - add_filter('pre_comment_approved', - create_function('$a', 'return \'spam\';')); - } - } - return $comment_data; - } - - function relative_redirect($location, $comment) { - if ($this->_saved_error != '') { - // replace #comment- at the end of $location with #commentform - $location = substr($location, 0, strpos($location, '#')) . - ((strpos($location, "?") === false) ? "?" : "&") . - 'rcommentid=' . $comment->comment_ID . - '&rerror=' . $this->_saved_error . - '&rchash=' . $this->hash_comment($comment->comment_ID) . - '#commentform'; - } - return $location; - } - - function saved_comment() { - if (!is_single() && !is_page()) - return; - $comment_id = $_REQUEST['rcommentid']; - $comment_hash = $_REQUEST['rchash']; - if (empty($comment_id) || empty($comment_hash)) - return; - if ($comment_hash == $this->hash_comment($comment_id)) { - $comment = get_comment($comment_id); - - // todo: removed double quote from list of 'dangerous characters' - $com = preg_replace('/([\\/\(\)\+\;\'])/e', - '\'%\' . dechex(ord(\'$1\'))', - $comment->comment_content); - $com = preg_replace('/\\r\\n/m', '\\\n', $com); - echo " - <script type='text/javascript'> - var _recaptcha_wordpress_savedcomment = '" . $com ."'; - _recaptcha_wordpress_savedcomment = - unescape(_recaptcha_wordpress_savedcomment); - </script> - "; - - wp_delete_comment($comment->comment_ID); - } - } - - // add a settings link to the plugin in the plugin list - function show_settings_link($links, $file) { - if ($file == plugin_basename($this->path_to_plugin_directory() . - '/wp-recaptcha.php')) { - $settings_title = __('Settings for this Plugin', 'recaptcha'); - $settings = __('Settings', 'recaptcha'); - $settings_link = - '<a href="options-general.php?page=wp-recaptcha/recaptcha.php"' . - ' title="' . $settings_title . '">' . $settings . '</a>'; - array_unshift($links, $settings_link); - } - return $links; - } - - // add the settings page - function add_settings_page() { - // add the options page - if ($this->environment == Environment::WordPressMU && - $this->is_authority()) - add_submenu_page('wpmu-admin.php', 'WP-reCAPTCHA', 'WP-reCAPTCHA', - 'manage_options', __FILE__, array(&$this, 'show_settings_page')); - add_options_page('WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', - __FILE__, array(&$this, 'show_settings_page')); - } - // store the xhtml in a separate file and use include on it - function show_settings_page() { - include("settings.php"); - } - - function build_dropdown($name, $keyvalue, $checked_value) { - echo '<select name="' . $name . '" id="' . $name . '">' . "\n"; - foreach ($keyvalue as $key => $value) { - $checked = ($value == $checked_value) ? - ' selected="selected" ' : ''; - echo '\t <option value="' . $value . '"' . $checked . - ">$key</option> \n"; - $checked = NULL; - } - echo "</select> \n"; - } - - function theme_dropdown() { - $themes = array ( - __('Standard', 'recaptcha') => 'standard', - __('Light', 'recaptcha') => 'light', - __('Dark', 'recaptcha') => 'dark' - ); - $this->build_dropdown('recaptcha_options[comments_theme]', $themes, - $this->options['comments_theme']); - } - - function recaptcha_language_dropdown() { - $languages = array ( - __('English', 'recaptcha') => 'en', - __('Arabic', 'recaptcha') => 'ar', - __('Bulgarian', 'recaptcha') => 'bg', - __('Catalan Valencian', 'recaptcha') => 'ca', - __('Czech', 'recaptcha') => 'cs', - __('Danish', 'recaptcha') => 'da', - __('German', 'recaptcha') => 'de', - __('Greek', 'recaptcha') => 'el', - __('British English', 'recaptcha') => 'en_gb', - __('Spanish', 'recaptcha') => 'es', - __('Persian', 'recaptcha') => 'fa', - __('French', 'recaptcha') => 'fr', - __('Canadian French', 'recaptcha') => 'fr_ca', - __('Hindi', 'recaptcha') => 'hi', - __('Croatian', 'recaptcha') => 'hr', - __('Hungarian', 'recaptcha') => 'hu', - __('Indonesian', 'recaptcha') => 'id', - __('Italian', 'recaptcha') => 'it', - __('Hebrew', 'recaptcha') => 'iw', - __('Jananese', 'recaptcha') => 'ja', - __('Korean', 'recaptcha') => 'ko', - __('Lithuanian', 'recaptcha') => 'lt', - __('Latvian', 'recaptcha') => 'lv', - __('Dutch', 'recaptcha') => 'nl', - __('Norwegian', 'recaptcha') => 'no', - __('Polish', 'recaptcha') => 'pl', - __('Portuguese', 'recaptcha') => 'pt', - __('Romanian', 'recaptcha') => 'ro', - __('Russian', 'recaptcha') => 'ru', - __('Slovak', 'recaptcha') => 'sk', - __('Slovene', 'recaptcha') => 'sl', - __('Serbian', 'recaptcha') => 'sr', - __('Swedish', 'recaptcha') => 'sv', - __('Thai', 'recaptcha') => 'th', - __('Turkish', 'recaptcha') => 'tr', - __('Ukrainian', 'recaptcha') => 'uk', - __('Vietnamese', 'recaptcha') => 'vi', - __('Simplified Chinese', 'recaptcha') => 'zh_cn', - __('Traditional Chinese', 'recaptcha') => 'zh_tw' - ); - - $this->build_dropdown('recaptcha_options[recaptcha_language]', - $languages, $this->options['recaptcha_language']); - } -} // end class declaration - -?> diff --git a/wp-content/plugins/wp-recaptcha/recaptchalib.php b/wp-content/plugins/wp-recaptcha/recaptchalib.php deleted file mode 100644 index a9053e2904ac7e04faafc0d83890161116b4b884..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/recaptchalib.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php -/** - * This is a PHP library that handles calling reCAPTCHA. - * - Documentation and latest version - * https://developers.google.com/recaptcha/docs/php - * - Get a reCAPTCHA API Key - * https://www.google.com/recaptcha/admin/create - * - Discussion group - * http://groups.google.com/group/recaptcha - * - * @copyright Copyright (c) 2014, Google Inc. - * @link http://www.google.com/recaptcha - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * A ReCaptchaResponse is returned from checkAnswer(). - */ -class ReCaptchaResponse -{ - public $success; - public $errorCodes; -} - -class ReCaptcha -{ - private static $_signupUrl = "https://www.google.com/recaptcha/admin"; - private static $_siteVerifyUrl = - "https://www.google.com/recaptcha/api/siteverify?"; - private $_secret; - private static $_version = "wp_php_1.0"; - - /** - * Constructor. - * - * @param string $secret shared secret between site and ReCAPTCHA server. - */ - function ReCaptcha($secret) - { - if ($secret == null || $secret == "") { - die("To use reCAPTCHA you must get an API key from <a href='" - . self::$_signupUrl . "'>" . self::$_signupUrl . "</a>"); - } - $this->_secret=$secret; - } - - /** - * Encodes the given data into a query string format. - * - * @param array $data array of string elements to be encoded. - * - * @return string - encoded request. - */ - private function _encodeQS($data) - { - $req = ""; - foreach ($data as $key => $value) { - $req .= $key . '=' . urlencode(stripslashes($value)) . '&'; - } - - // Cut the last '&' - $req=substr($req, 0, strlen($req)-1); - return $req; - } - - /** - * Submits an HTTP GET to a reCAPTCHA server. - * - * @param string $path url path to recaptcha server. - * @param array $data array of parameters to be sent. - * - * @return array response - */ - private function _submitHTTPGet($path, $data) - { - $req = $this->_encodeQS($data); - $response = file_get_contents($path . $req); - return $response; - } - - /** - * Calls the reCAPTCHA siteverify API to verify whether the user passes - * CAPTCHA test. - * - * @param string $remoteIp IP address of end user. - * @param string $response response string from recaptcha verification. - * - * @return ReCaptchaResponse - */ - public function verifyResponse($remoteIp, $response) - { - // Discard empty solution submissions - if ($response == null || strlen($response) == 0) { - $recaptchaResponse = new ReCaptchaResponse(); - $recaptchaResponse->success = false; - $recaptchaResponse->errorCodes = 'missing-input'; - return $recaptchaResponse; - } - - $getResponse = $this->_submitHttpGet( - self::$_siteVerifyUrl, - array ( - 'secret' => $this->_secret, - 'remoteip' => $remoteIp, - 'v' => self::$_version, - 'response' => $response - ) - ); - $answers = json_decode($getResponse, true); - $recaptchaResponse = new ReCaptchaResponse(); - - if (trim($answers [success]) == true) { - $recaptchaResponse->success = true; - } else { - $recaptchaResponse->success = false; - $recaptchaResponse->errorCodes = $answers [error-codes]; - } - - return $recaptchaResponse; - } -} - -?> diff --git a/wp-content/plugins/wp-recaptcha/screenshot-1.png b/wp-content/plugins/wp-recaptcha/screenshot-1.png deleted file mode 100644 index 4db34f71c2b9399d41fb586a2f2e236938351ac4..0000000000000000000000000000000000000000 Binary files a/wp-content/plugins/wp-recaptcha/screenshot-1.png and /dev/null differ diff --git a/wp-content/plugins/wp-recaptcha/screenshot-2.png b/wp-content/plugins/wp-recaptcha/screenshot-2.png deleted file mode 100644 index acaf1b3dffe5c1284e6c28b363b9130f923f1a92..0000000000000000000000000000000000000000 Binary files a/wp-content/plugins/wp-recaptcha/screenshot-2.png and /dev/null differ diff --git a/wp-content/plugins/wp-recaptcha/settings.php b/wp-content/plugins/wp-recaptcha/settings.php deleted file mode 100644 index fb3606ee63ebf6a1d128d79cbb07458c756f8aa7..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/settings.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * This is a WordPress plugin settings that handles calling reCAPTCHA. - * - Documentation and latest version - * https://developers.google.com/recaptcha/docs/php - * - Get a reCAPTCHA API Key - * https://www.google.com/recaptcha/admin/create - * - Discussion group - * http://groups.google.com/group/recaptcha - * - * @link http://www.google.com/recaptcha - */ - -if (defined('ALLOW_INCLUDE') === false) - die('no direct access'); -?> - -<div class="wrap"> - <a name="recaptcha"></a> - <h2><?php _e('reCAPTCHA Options', 'recaptcha'); ?></h2> - <p><?php _e('reCAPTCHA is a free, accessible CAPTCHA service that helps to block spam on your blog.', 'recaptcha'); ?></p> - - <form method="post" action="options.php"> - <?php settings_fields('recaptcha_options_group'); ?> - - <h3><?php _e('Authentication', 'recaptcha'); ?></h3> - <p><?php _e('These keys are required. You can register them at', 'recaptcha'); ?> - <a href="http://www.google.com/recaptcha/admin/create" title="<?php _e('Get your reCAPTCHA API Keys', 'recaptcha'); ?>"><?php _e('here', 'recaptcha'); ?></a>.</p> - <p><?php _e('These keys should be non-global key!', 'recaptcha'); ?></p> - - <table class="form-table"> - <tr valign="top"> - <th scope="row"><?php _e('Site Key (Public Key)', 'recaptcha'); ?></th> - <td> - <input type="text" name="recaptcha_options[site_key]" size="40" value="<?php echo $this->options['site_key']; ?>" /> - </td> - </tr> - <tr valign="top"> - <th scope="row"><?php _e('Secret (Private Key)', 'recaptcha'); ?></th> - <td> - <input type="text" name="recaptcha_options[secret]" size="40" value="<?php echo $this->options['secret']; ?>" /> - </td> - </tr> - </table> - - <h3><?php _e('General Options', 'recaptcha'); ?></h3> - <table class="form-table"> - <tr valign="top"> - <th scope="row"><?php _e('Theme', 'recaptcha'); ?></th> - <td> - <?php $this->theme_dropdown(); ?> - </td> - </tr> - - <tr valign="top"> - <th scope="row"><?php _e('Language', 'recaptcha'); ?></th> - <td> - <?php $this->recaptcha_language_dropdown(); ?> - </td> - </tr> - </table> - - <h3><?php _e('Error Messages', 'recaptcha'); ?></h3> - <table class="form-table"> - <tr valign="top"> - <th scope="row"><?php _e('reCAPTCHA Ignored', 'recaptcha'); ?></th> - <td> - <input type="text" name="recaptcha_options[no_response_error]" size="70" value="<?php echo $this->options['no_response_error']; ?>" /> - </td> - </tr> - </table> - - <p class="submit"><input type="submit" class="button-primary" title="<?php _e('Save reCAPTCHA Options') ?>" value="<?php _e('Save reCAPTCHA Changes') ?> »" /></p> - </form> - - <?php do_settings_sections('recaptcha_options_page'); ?> -</div> \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/uninstall.php b/wp-content/plugins/wp-recaptcha/uninstall.php deleted file mode 100644 index 3e23a59d4325cb4020626fab68ac534610130123..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/uninstall.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -// this is the uninstall handler -// include unregister_setting, delete_option, and other uninstall behavior here - -require_once('wp-plugin.php'); - -function uninstall_options($name) { - unregister_setting("${name}_group", $name); - WPPlugin::remove_options($name); -} - -// recaptcha -uninstall_options('recaptcha_options'); - -?> \ No newline at end of file diff --git a/wp-content/plugins/wp-recaptcha/wp-plugin.php b/wp-content/plugins/wp-recaptcha/wp-plugin.php deleted file mode 100644 index ef05111ee044ab2808dec671cceaa10b15970ffb..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/wp-plugin.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -// just making sure the constant is defined -if (!defined('WP_CONTENT_DIR')) - define('WP_CONTENT_DIR', ABSPATH . 'wp-content'); - -if (!class_exists('Environment')) { - class Environment { - const WordPress = 1; // regular wordpress - const WordPressMU = 2; // wordpress mu - const WordPressMS = 3; // wordpress multi-site - } -} - -if (!class_exists('WPPlugin')) { - abstract class WPPlugin { - protected $environment; // what environment are we in - protected $options_name; // the name of the options - - protected $options; - - function WPPlugin($options_name) { - $args = func_get_args(); - call_user_func_array(array(&$this, "__construct"), $args); - } - - function __construct($options_name) { - $this->environment = WPPlugin::determine_environment(); - $this->options_name = $options_name; - - $this->options = WPPlugin::retrieve_options($this->options_name); - } - - // sub-classes determine what actions and filters to hook - abstract protected function register_actions(); - abstract protected function register_filters(); - - // environment checking - static function determine_environment() { - global $wpmu_version; - - if (function_exists('is_multisite')) - if (is_multisite()) - return Environment::WordPressMS; - - if (!empty($wpmu_version)) - return Environment::WordPressMU; - - return Environment::WordPress; - } - - // path finding - static function plugins_directory() { - if (WPPlugin::determine_environment() == Environment::WordPressMU) - return WP_CONTENT_DIR . '/mu-plugins'; - else - return WP_CONTENT_DIR . '/plugins'; - } - - static function plugins_url() { - if (WPPlugin::determine_environment() == Environment::WordPressMU) - return site_url() . '/wp-content/mu-plugins'; - else - return site_url() . '/wp-content/plugins'; - } - - static function path_to_plugin_directory() { - $current_directory = basename(dirname(__FILE__)); - - return WPPlugin::plugins_directory() . "/${current_directory}"; - } - - static function url_to_plugin_directory() { - $current_directory = basename(dirname(__FILE__)); - - return WPPlugin::plugins_url() . "/${current_directory}"; - } - - static function path_to_plugin($file_path) { - $file_name = basename($file_path); // /etc/blah/file.txt => file.txt - - if (WPPlugin::determine_environment() == Environment::WordPressMU) - return WPPlugin::plugins_directory() . "/${file_name}"; - else - return WPPlugin::path_to_plugin_directory() . "/${file_name}"; - } - - // options - abstract protected function register_default_options(); - - // option retrieval - static function retrieve_options($options_name) { - if (WPPlugin::determine_environment() == Environment::WordPressMU) - return get_site_option($options_name); - else - return get_option($options_name); - } - - static function remove_options($options_name) { - if (WPPlugin::determine_environment() == Environment::WordPressMU) - return delete_site_option($options_name); - else - return delete_option($options_name); - } - - static function add_options($options_name, $options) { - if (WPPlugin::determine_environment() == Environment::WordPressMU) - return add_site_option($options_name, $options); - else - return add_option($options_name, $options); - } - - protected function is_multi_blog() { - return $this->environment != Environment::WordPress; - } - - // calls the appropriate 'authority' checking function - protected function is_authority() { - if ($this->environment == Environment::WordPress) - return is_admin(); - - if ($this->environment == Environment::WordPressMU) - return is_site_admin(); - - if ($this->environment == Environment::WordPressMS) - return is_super_admin(); - } - } -} - -?> diff --git a/wp-content/plugins/wp-recaptcha/wp-recaptcha.php b/wp-content/plugins/wp-recaptcha/wp-recaptcha.php deleted file mode 100644 index 8810ee1ce71a4448e7dea7a1c43bf2c4b6b6510a..0000000000000000000000000000000000000000 --- a/wp-content/plugins/wp-recaptcha/wp-recaptcha.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/* -Plugin Name: WP-reCAPTCHA -Description: Integrates reCAPTCHA anti-spam solutions with wordpress -Version: 4.1 -Email: support@recaptcha.net -*/ - -// this is the 'driver' file that instantiates the objects and registers every hook - -define('ALLOW_INCLUDE', true); - -require_once('recaptcha.php'); - -$recaptcha = new ReCAPTCHAPlugin('recaptcha_options'); - -?>