Skip to content

Commit ec6f402

Browse files
committed
Make the Ruby code error-safe
1 parent f42083d commit ec6f402

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/linux/http/appsmith_rce_cve_2024_55964.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def exploit
9797
})
9898
fail_with(Failure::Unknown, 'Failed to access workspaces.') unless res&.code == 200
9999

100-
workspace_id = res.get_json_document['data'][0]['id']
100+
workspace_id = res.get_json_document&.dig('data')&.first&.dig('id')
101101

102102
res = send_request_cgi({
103103
'method' => 'GET',

0 commit comments

Comments
 (0)