We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fd80ae commit 0d3be41Copy full SHA for 0d3be41
test/aikido/zen/sinks/file_test.rb
@@ -266,11 +266,9 @@ class AttackDetectionTest < ActiveSupport::TestCase
266
def assert_path_traversal_attack(operation, &block)
267
set_context_from_request_to "/?filename=#{OFFENDER_PATH}"
268
269
- assert_attack Aikido::Zen::Attacks::PathTraversalAttack, &block
+ error = assert_attack Aikido::Zen::Attacks::PathTraversalAttack, &block
270
271
- assert_equal \
272
- error.message,
273
- "Path Traversal: Malicious user input «#{OFFENDER_PATH}» detected while calling method #{operation}"
+ assert_equal error.attack.operation, operation
274
end
275
276
test "attacks are detected by the scanner" do
0 commit comments