From fd6df3fb813780324bb79bd6c7622c0d1e02acf4 Mon Sep 17 00:00:00 2001 From: tart0ru5 Date: Wed, 6 May 2026 11:58:50 +0800 Subject: [PATCH] Improve failure condition checks The prior check silently passes when `res` is `nil` (e.g. request timeout / host unreachable), because `nil != 403` evaluates to `true` --- modules/exploits/linux/http/projectsend_unauth_rce.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/exploits/linux/http/projectsend_unauth_rce.rb b/modules/exploits/linux/http/projectsend_unauth_rce.rb index 85d9c2a6e6..9eb423a49f 100644 --- a/modules/exploits/linux/http/projectsend_unauth_rce.rb +++ b/modules/exploits/linux/http/projectsend_unauth_rce.rb @@ -217,7 +217,7 @@ class MetasploitModule < Msf::Exploit::Remote 'vars_post' => params }) - fail_with(Failure::Unknown, 'Could not create a new user') unless res&.code != 403 + fail_with(Failure::Unknown, 'Could not create a new user') if res.nil? || res.code == 403 print_good("User #{username} created with password #{password}") end