File tree Expand file tree Collapse file tree 3 files changed +21
-9
lines changed
lib/codeql/ruby/frameworks
test/library-tests/frameworks/action_mailbox Expand file tree Collapse file tree 3 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,19 @@ module ActionMailbox {
25
25
}
26
26
27
27
/**
28
- * A call to `ActionMailbox::Base#mail`, which is equivalent to calling `inbound_mail.mail`.
29
- * The returned object contains data from the incoming mail.
28
+ * A call to `mail` on the return value of
29
+ * `ActionMailbox::Base#inbound_email`, or a direct call to
30
+ * `ActionMailbox::Base#mail`, which is equivalent. The returned object
31
+ * contains data from the incoming email.
30
32
*/
31
33
class MailCall extends DataFlow:: CallNode , Mail:: Message:: Range {
32
- MailCall ( ) { this = controller ( ) .getAnInstanceSelf ( ) .getAMethodCall ( "mail" ) }
34
+ MailCall ( ) {
35
+ this =
36
+ [
37
+ controller ( ) .getAnInstanceSelf ( ) .getAMethodCall ( "inbound_email" ) .getAMethodCall ( "mail" ) ,
38
+ controller ( ) .getAnInstanceSelf ( ) .getAMethodCall ( "mail" )
39
+ ]
40
+ }
33
41
}
34
42
35
43
/**
Original file line number Diff line number Diff line change 1
1
processMethods
2
- | action_mailbox.rb:2:3:5 :5 | process |
3
- | action_mailbox.rb:13 :5:15 :7 | process |
2
+ | action_mailbox.rb:2:3:7 :5 | process |
3
+ | action_mailbox.rb:15 :5:17 :7 | process |
4
4
messageInstances
5
5
| action_mailbox.rb:3:5:3:8 | call to mail |
6
6
| action_mailbox.rb:4:5:4:8 | call to mail |
7
- | action_mailbox.rb:8:5:8:8 | call to mail |
8
- | action_mailbox.rb:14:9:14:12 | call to mail |
7
+ | action_mailbox.rb:6:5:6:10 | call to mail |
8
+ | action_mailbox.rb:10:5:10:8 | call to mail |
9
+ | action_mailbox.rb:16:9:16:12 | call to mail |
9
10
remoteContent
10
11
| action_mailbox.rb:3:5:3:13 | call to body |
11
12
| action_mailbox.rb:4:5:4:11 | call to to |
12
- | action_mailbox.rb:8:5:8:18 | call to text_part |
13
- | action_mailbox.rb:14:9:14:23 | call to raw_source |
13
+ | action_mailbox.rb:6:5:6:13 | call to to |
14
+ | action_mailbox.rb:10:5:10:18 | call to text_part |
15
+ | action_mailbox.rb:16:9:16:23 | call to raw_source |
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ class A < ActionMailbox::Base
2
2
def process
3
3
mail . body
4
4
mail . to
5
+ m = inbound_email
6
+ m . mail . to
5
7
end
6
8
7
9
def other_method
You can’t perform that action at this time.
0 commit comments