コード例 #1
0
ファイル: actions.py プロジェクト: myrdd/amo-validator
def test_literal(traverser, value):
    """
    Test the value of a literal, in particular only a string literal at the
    moment, against possibly dangerous patterns.
    """
    if isinstance(value, basestring):
        validate_string(value, traverser)
コード例 #2
0
def test_literal(traverser, wrapper):
    """
    Test the value of a literal, in particular only a string literal at the
    moment, against possibly dangerous patterns.
    """
    value = wrapper.get_literal_value()
    if isinstance(value, basestring):
        # Local import to prevent import loop.
        from validator.testcases.regex import validate_string
        validate_string(value, traverser, wrapper=wrapper)
コード例 #3
0
ファイル: actions.py プロジェクト: l-hedgehog/amo-validator
def test_literal(traverser, wrapper):
    """
    Test the value of a literal, in particular only a string literal at the
    moment, against possibly dangerous patterns.
    """
    value = wrapper.get_literal_value()
    if isinstance(value, basestring):
        # Local import to prevent import loop.
        from validator.testcases.regex import validate_string
        validate_string(value, traverser, wrapper=wrapper)