chiefonboarding / ChiefOnboarding

Free and open-source employee onboarding platform. Onboard new hires through Slack or the web portal.
https://chiefonboarding.com
GNU Affero General Public License v3.0
673 stars 123 forks source link

Using `{{access_overview}}` in `exists` part of manifest could lead to `RecursionError` #390

Open GDay opened 11 months ago

GDay commented 11 months ago

The {{access_overview}} variable checks all integrations if they are still active (generally used in the execute part). If this variable is also called in the exists part of the manifest then it will run the same command again and will create an infinite loop.

Example manifest that will trigger this error:

{
    "form": [],
    "exists": {
        "url": "https://chiefonboarding.com",
        "method": "GET",
        "expected": "{{access_overview}}"
    },
    "execute": [
        {
            "url": "https://chiefonboarding.com",
            "data": {
                "user": "{{access_overview}}"
            },
            "method": "POST"
        }
    ]
}

It's extremely unlikely that access_overview will ever be needed in the exists part.

Originally posted here: https://github.com/chiefonboarding/ChiefOnboarding/pull/385#discussion_r1382538779