mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
Fix out-of-index issue in rewrite plugin (#5462)
This PR fixes another out-of-index issue in rewrite to avoid security vuln. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -100,6 +100,9 @@ func newRule(args ...string) (Rule, error) {
|
||||
switch arg0 {
|
||||
case Continue:
|
||||
mode = Continue
|
||||
if len(args) < 2 {
|
||||
return nil, fmt.Errorf("continue rule must begin with a rule type")
|
||||
}
|
||||
ruleType = strings.ToLower(args[1])
|
||||
expectNumArgs = len(args) - 1
|
||||
startArg = 2
|
||||
|
||||
Reference in New Issue
Block a user