safe navigation operator on res
This commit is contained in:
@@ -69,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
def find_wmusecurity_id
|
||||
res = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, blogpath) })
|
||||
wmusecurity_id = res.body.match(/wmuSecurity":"(\w+)/)&.captures
|
||||
wmusecurity_id = res&.body.match(/wmuSecurity":"(\w+)/)&.captures
|
||||
unless wmusecurity_id
|
||||
fail_with(Failure::NotFound, 'Failed to retrieve the wmusecurity id')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user