Skip to content

Commit a69e2ea

Browse files
authored
Merge pull request rapid7#21413 from tart0ru5/patch-1
Improve failure condition checks
2 parents 2be37dd + fd6df3f commit a69e2ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/exploits/linux/http/projectsend_unauth_rce.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def register_new_user(username, password)
217217
'vars_post' => params
218218
})
219219

220-
fail_with(Failure::Unknown, 'Could not create a new user') unless res&.code != 403
220+
fail_with(Failure::Unknown, 'Could not create a new user') if res.nil? || res.code == 403
221221
print_good("User #{username} created with password #{password}")
222222
end
223223

0 commit comments

Comments
 (0)