3
3
import java
4
4
import semmle.code.java.dataflow.DataFlow
5
5
6
- /** An `onRecieve ` method of a `BroadcastReciever ` */
6
+ /** An `onReceive ` method of a `BroadcastReceiver ` */
7
7
private class OnReceiveMethod extends Method {
8
8
OnReceiveMethod ( ) {
9
9
this .getASourceOverriddenMethod * ( )
10
- .hasQualifiedName ( "android.content" , "BroadcastReciever " , "onReceeve " )
10
+ .hasQualifiedName ( "android.content" , "BroadcastReceiver " , "onReceive " )
11
11
}
12
12
13
13
/** Gets the paramter of this method that holds the received `Intent`. */
@@ -30,7 +30,7 @@ private class VerifiedIntentConfig extends DataFlow::Configuration {
30
30
}
31
31
}
32
32
33
- /** An `onRecieve ` method that doesn't verify the action of the intent it recieves. */
33
+ /** An `onReceive ` method that doesn't verify the action of the intent it recieves. */
34
34
class UnverifiedOnReceiveMethod extends OnReceiveMethod {
35
35
UnverifiedOnReceiveMethod ( ) {
36
36
not any ( VerifiedIntentConfig c ) .hasFlow ( DataFlow:: parameterNode ( this .getIntentParameter ( ) ) , _)
@@ -74,7 +74,7 @@ class SystemActionName extends Top {
74
74
string getName ( ) { result = name }
75
75
}
76
76
77
- /** A call to `Context.registerReciever ` */
77
+ /** A call to `Context.registerReceiver ` */
78
78
private class RegisterReceiverCall extends MethodAccess {
79
79
RegisterReceiverCall ( ) {
80
80
this .getMethod ( )
@@ -89,7 +89,7 @@ private class RegisterReceiverCall extends MethodAccess {
89
89
Expr getFilterArgument ( ) { result = this .getArgument ( 1 ) }
90
90
}
91
91
92
- /** A configuration to detect uses of `registerReciever ` with system intent actions. */
92
+ /** A configuration to detect uses of `registerReceiver ` with system intent actions. */
93
93
private class RegisterSystemActionConfig extends DataFlow:: Configuration {
94
94
RegisterSystemActionConfig ( ) { this = "RegisterSystemActionConfig" }
95
95
@@ -121,7 +121,7 @@ private class RegisterSystemActionConfig extends DataFlow::Configuration {
121
121
}
122
122
123
123
/** Holds if `rrc` registers a reciever `orm` to recieve the system action `sa` that doesn't verifiy intents it recieves. */
124
- predicate registeredUnverifiedSystemReciever (
124
+ predicate registeredUnverifiedSystemReceiver (
125
125
RegisterReceiverCall rrc , UnverifiedOnReceiveMethod orm , SystemActionName sa
126
126
) {
127
127
exists ( RegisterSystemActionConfig conf , ConstructorCall cc |
@@ -132,7 +132,7 @@ predicate registeredUnverifiedSystemReciever(
132
132
}
133
133
134
134
/** Holds if the XML element `rec` declares a reciever `orm` to recieve the system action named `sa` that doesn't verifiy intents it recieves. */
135
- predicate xmlUnverifiedSystemReciever (
135
+ predicate xmlUnverifiedSystemReceiver (
136
136
XMLElement rec , UnverifiedOnReceiveMethod orm , SystemActionName sa
137
137
) {
138
138
exists ( XMLElement filter , XMLElement action , Class ormty |
@@ -148,7 +148,7 @@ predicate xmlUnverifiedSystemReciever(
148
148
}
149
149
150
150
/** Holds if `reg` registers (either explicitly or through XML) a reciever `orm` to recieve the system action named `sa` that doesn't verify intents it recieves. */
151
- predicate unverifiedSystemReciever ( Top reg , Method orm , SystemActionName sa ) {
152
- registeredUnverifiedSystemReciever ( reg , orm , sa ) or
153
- xmlUnverifiedSystemReciever ( reg , orm , sa )
151
+ predicate unverifiedSystemReceiver ( Top reg , Method orm , SystemActionName sa ) {
152
+ registeredUnverifiedSystemReceiver ( reg , orm , sa ) or
153
+ xmlUnverifiedSystemReceiver ( reg , orm , sa )
154
154
}
0 commit comments