Project

General

Profile

Actions

Bug #295

closed

error reporting on malformed vars used in rules

Added by Victor Julien over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

This happened to me when I started using Suri as well. In my case I had messed up a variable definition (my HOME_NET variable was badly formed, missing a trailing ']' on the address list). Although no failure occurred parsing the variable configuration, the rule parser encountered it when loading the rules and saw the rules involving HOME_NET to be malformed. Double check your configuration.

Dev team, update needed to abort on failure when unable to parse variables properly?

@Gerardo: can you check and fix both 1.0.4 and the git master?

Actions #1

Updated by Brant Wells over 13 years ago

This also occurs when not wrapping vars with the double quotes in lines such as:

EXTERNAL_NET: !$HOME_NET

The above line allows Suri to run, but causes all of the errors.
The line below works correctly in the config --
EXTERNAL_NET: "!$HOME_NET"

The default config of EXTERNAL_NET: any works properly without any errors.

Actions #2

Updated by Victor Julien about 13 years ago

  • Assignee changed from Gerado Iglesias Galvan to Peter Manev
  • Target version set to 1.1rc1

Peter, can you figure out in what cases we fail to properly parse the vars in our git master?

Actions #3

Updated by Victor Julien about 13 years ago

  • Status changed from Assigned to Closed

This issue appears to be a YAML limitation. YAML uses a unquoted exclamation mark to indicate a user defined data type: "Many implementations of YAML can support user defined data types. This is a good way to serialize an object. Local data types are not universal data types but are defined in the application using the YAML parser library. Local data types use a single exclamation mark ( ! )." (from: http://en.wikipedia.org/wiki/YAML).

So the solution is to use quotes.

I've added some warnings for when one or more brackets are missing. Will be merged soon.

Actions

Also available in: Atom PDF