Skip to content

Parser does not fail for some invalid expressions #15

Closed
@oli-ver

Description

@oli-ver

Currently the parser accepts the following datemath expressions (and just returns "now" in UTC):

+1ö
+1ä
+1ü
+1ß
+1,
+1.

Expected behavior: Error message "Not a valid timeunit: "

I debugged the code to check why this is happening. It seems you are using the regular expression [a-zA-Z] to validate the character before beginning to calculate the date. Unfortunatley this leads to just leaving the while loop in helper.py without any further processing (or error handling):

image

Kind regards

Oliver

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions