Support » Plugin: No User Enumeration » Undefined index “rest_route”

  • I got an notice, when developing with WP_DEBUG on true, so I added an isset check on $_REQUEST['rest_route'] on line 143 / 144

    
    $call_rest_api_v2 = preg_match($regex_api_v2, $_SERVER['REQUEST_URI']) || ( isset( $_REQUEST['rest_route'] ) && preg_match($regex_api_v2, $_REQUEST['rest_route'] ) );
    $call_rest_api_v1 = preg_match($regex_api_v1, $_SERVER['REQUEST_URI']) || ( isset( $_REQUEST['rest_route'] ) && preg_match($regex_api_v2, $_REQUEST['rest_route'] ) );
    

    Else it returns a notice.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jaime Martinez

    (@jmslbam)

    Hi, is there a github repo where I can push this change to? Or could you add me a co-author so I can fix this, if you don’t have time.

    I hope to hear from your.

    Yourse sincerly,

    Jaime

    Plugin Author Carlos

    (@carlost800)

    Many thanks Jaime for reporting this issue.
    I used other approach for fix that: a class method that uses array_key_exists and is_string functions.
    Fixed in the new version 1.3.2 and apologies for the delay.

    • This reply was modified 3 years, 4 months ago by Carlos.
    Thread Starter Jaime Martinez

    (@jmslbam)

    Thank you! I’ve tested it, no more notices.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Undefined index “rest_route”’ is closed to new replies.