mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
JS: Use FlowState::fromFlowLabel instead of Label::toFlowState
This works better for other queries where we don't already have a module named Label
This commit is contained in:
@@ -53,7 +53,7 @@ module TaintedPath {
|
||||
|
||||
/** DEPRECATED. Use `blocksExpr` instead. */
|
||||
deprecated predicate sanitizes(boolean outcome, Expr e, DataFlow::FlowLabel label) {
|
||||
this.blocksExpr(outcome, e, Label::toFlowState(label))
|
||||
this.blocksExpr(outcome, e, FlowState::fromFlowLabel(label))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,11 +178,12 @@ module TaintedPath {
|
||||
|
||||
deprecated override Label::SplitPath toFlowLabel() { any() }
|
||||
}
|
||||
|
||||
/** Convert the given flow label to the corresponding flow state. */
|
||||
deprecated FlowState fromFlowLabel(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
|
||||
}
|
||||
|
||||
deprecated module Label {
|
||||
FlowState toFlowState(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
|
||||
|
||||
class Normalization = FlowState::Normalization;
|
||||
|
||||
class Relativeness = FlowState::Relativeness;
|
||||
@@ -872,7 +873,8 @@ module TaintedPath {
|
||||
DataFlow::Node src, DataFlow::Node dst, DataFlow::FlowLabel srclabel,
|
||||
DataFlow::FlowLabel dstlabel
|
||||
) {
|
||||
isAdditionalFlowStep(src, Label::toFlowState(srclabel), dst, Label::toFlowState(dstlabel))
|
||||
isAdditionalFlowStep(src, FlowState::fromFlowLabel(srclabel), dst,
|
||||
FlowState::fromFlowLabel(dstlabel))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,7 +74,7 @@ deprecated class Configuration extends DataFlow::Configuration {
|
||||
DataFlow::Node src, DataFlow::Node dst, DataFlow::FlowLabel srclabel,
|
||||
DataFlow::FlowLabel dstlabel
|
||||
) {
|
||||
ZipSlipConfig::isAdditionalFlowStep(src, TaintedPath::Label::toFlowState(srclabel), dst,
|
||||
TaintedPath::Label::toFlowState(dstlabel))
|
||||
ZipSlipConfig::isAdditionalFlowStep(src, TaintedPath::FlowState::fromFlowLabel(srclabel), dst,
|
||||
TaintedPath::FlowState::fromFlowLabel(dstlabel))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user