Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/handle invalid wp json response #1818

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alexsanford
Copy link
Contributor

Fixes #1817

Testing instructions

Add the following code snippet to the WordPress site to simulate an unusual string response from the JSON API.

add_action( 'rest_api_init', function( $wp_rest_server ) { die( '404' ); } );

Run WPScan against the site and try to enumerate users (-e u). It should not crash.

@coveralls
Copy link

coveralls commented Nov 30, 2023

Coverage Status

coverage: 85.984% (+0.02%) from 85.966%
when pulling d2841db on fix/handle-invalid-wp-json-response
into 96b6b81 on master.

@alexsanford alexsanford removed their assignment Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scan Aborted: undefined method `each' for 404:Integer
2 participants