Skip to content

Commit 87f26bf

Browse files
Fix typos
1 parent 1959f49 commit 87f26bf

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

java/ql/lib/semmle/code/java/security/ImproperIntentVerificationQuery.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import java
44
import semmle.code.java.dataflow.DataFlow
55

6-
/** An `onRecieve` method of a `BroadcastReciever` */
6+
/** An `onReceive` method of a `BroadcastReceiver` */
77
private 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. */
3434
class 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` */
7878
private 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. */
9393
private 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
}

java/ql/src/Security/CWE/CWE-925/ImproperIntentVerification.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ import java
1313
import semmle.code.java.security.ImproperIntentVerificationQuery
1414

1515
from Top reg, Method orm, SystemActionName sa
16-
where unverifiedSystemReciever(reg, orm, sa)
16+
where unverifiedSystemReceiver(reg, orm, sa)
1717
select orm, "This reciever doesn't verify intents it recieves, and is registered $@ to recieve $@.",
1818
reg, "here", sa, "the system action " + sa.getName()

0 commit comments

Comments
 (0)