33import java
44import semmle.code.java.dataflow.DataFlow
55
6- /** An `onRecieve ` method of a `BroadcastReciever ` */
6+ /** An `onReceive ` method of a `BroadcastReceiver ` */
77private class OnReceiveMethod extends Method {
88 OnReceiveMethod ( ) {
99 this .getASourceOverriddenMethod * ( )
10- .hasQualifiedName ( "android.content" , "BroadcastReciever " , "onReceeve " )
10+ .hasQualifiedName ( "android.content" , "BroadcastReceiver " , "onReceive " )
1111 }
1212
1313 /** Gets the paramter of this method that holds the received `Intent`. */
@@ -30,7 +30,7 @@ private class VerifiedIntentConfig extends DataFlow::Configuration {
3030 }
3131}
3232
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. */
3434class UnverifiedOnReceiveMethod extends OnReceiveMethod {
3535 UnverifiedOnReceiveMethod ( ) {
3636 not any ( VerifiedIntentConfig c ) .hasFlow ( DataFlow:: parameterNode ( this .getIntentParameter ( ) ) , _)
@@ -74,7 +74,7 @@ class SystemActionName extends Top {
7474 string getName ( ) { result = name }
7575}
7676
77- /** A call to `Context.registerReciever ` */
77+ /** A call to `Context.registerReceiver ` */
7878private class RegisterReceiverCall extends MethodAccess {
7979 RegisterReceiverCall ( ) {
8080 this .getMethod ( )
@@ -89,7 +89,7 @@ private class RegisterReceiverCall extends MethodAccess {
8989 Expr getFilterArgument ( ) { result = this .getArgument ( 1 ) }
9090}
9191
92- /** A configuration to detect uses of `registerReciever ` with system intent actions. */
92+ /** A configuration to detect uses of `registerReceiver ` with system intent actions. */
9393private class RegisterSystemActionConfig extends DataFlow:: Configuration {
9494 RegisterSystemActionConfig ( ) { this = "RegisterSystemActionConfig" }
9595
@@ -121,7 +121,7 @@ private class RegisterSystemActionConfig extends DataFlow::Configuration {
121121}
122122
123123/** 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 (
125125 RegisterReceiverCall rrc , UnverifiedOnReceiveMethod orm , SystemActionName sa
126126) {
127127 exists ( RegisterSystemActionConfig conf , ConstructorCall cc |
@@ -132,7 +132,7 @@ predicate registeredUnverifiedSystemReciever(
132132}
133133
134134/** 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 (
136136 XMLElement rec , UnverifiedOnReceiveMethod orm , SystemActionName sa
137137) {
138138 exists ( XMLElement filter , XMLElement action , Class ormty |
@@ -148,7 +148,7 @@ predicate xmlUnverifiedSystemReciever(
148148}
149149
150150/** 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 )
154154}
0 commit comments