Merge pull request #9407 from erik-krogh/rubyFixJoin

RB: fix bad CP in the charPred for CipherOperation
This commit is contained in:
Erik Krogh Kristensen
2022-06-13 13:17:50 +02:00
committed by GitHub

View File

@@ -528,22 +528,23 @@ private class CipherNode extends DataFlow::Node {
private class CipherOperation extends Cryptography::CryptographicOperation::Range,
DataFlow::CallNode {
private CipherNode cipherNode;
private DataFlow::Node input;
CipherOperation() {
// cipher instantiation is counted as a cipher operation with no input
cipherNode = this and cipherNode instanceof CipherInstantiation
or
this.getReceiver() = cipherNode and
this.getMethodName() = "update" and
input = this.getArgument(0)
this.getMethodName() = "update"
}
override Cryptography::EncryptionAlgorithm getAlgorithm() {
result = cipherNode.getCipher().getAlgorithm()
}
override DataFlow::Node getAnInput() { result = input }
override DataFlow::Node getAnInput() {
this.getMethodName() = "update" and
result = this.getArgument(0)
}
override predicate isWeak() {
cipherNode.getCipher().isWeak() or