Exception: WPScan::Error::WpAuthFailed
- Defined in:
- lib/wpscan/errors/wp_auth.rb
Overview
Raised when authenticated requests to the WP REST API are rejected.
Instance Method Summary collapse
-
#initialize(code, url) ⇒ WpAuthFailed
constructor
A new instance of WpAuthFailed.
- #to_s ⇒ Object
Constructor Details
#initialize(code, url) ⇒ WpAuthFailed
Returns a new instance of WpAuthFailed.
7 8 9 10 11 |
# File 'lib/wpscan/errors/wp_auth.rb', line 7 def initialize(code, url) super() @code = code @url = url end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/wpscan/errors/wp_auth.rb', line 13 def to_s "Authenticated REST API request to #{@url} returned HTTP #{@code}. " \ 'WordPress core does NOT accept regular account passwords on /wp-json over Basic Auth. ' \ 'The password passed to --wp-auth must be a WordPress Application Password ' \ '(WP >= 5.6): in wp-admin go to Users -> Profile -> Application Passwords, ' \ 'create one, and use the generated 24-character string (keep the spaces) as the password.' end |