Plugin Directory

Changeset 2002767


Ignore:
Timestamp:
12/28/2018 09:18:38 AM (7 years ago)
Author:
thapa.laxman
Message:

fixed author enumeration via curl & grep

File:
1 edited

Legend:

Unmodified
Added
Removed
  • disable-feeds-and-hide-usernames/trunk/disable-feeds-hide-usernames.php

    r1598482 r2002767  
    1616
    1717
     18
     19if (!is_admin()) {
     20    if (preg_match('/author=([0-9]*)/i', $_SERVER['QUERY_STRING'])) die();
     21    add_filter('redirect_canonical', function($redirect, $request){
     22        if (preg_match('/\?author=([0-9]*)(\/*)/i', $request)) die();
     23        else return $redirect;
     24    }, 10, 2);
     25}
     26
     27add_filter('login_errors', function($error){
     28    return "Incorrect login information";
     29});
     30
    1831add_action('template_redirect', function(){
    1932    if ( is_author() ) {
Note: See TracChangeset for help on using the changeset viewer.