botpress / studio

The studio is the main interface you'll use to build and edit your chatbot.
https://botpress.com/docs/quickstart#conversation-studio
33 stars 37 forks source link

fix(security): fix access to public envs when bot is unmounted #374

Closed laurentlp closed 1 year ago

laurentlp commented 1 year ago

This PR fixes an issue where unmounting a bot would prevent the user from accessing the bot settings page.

The issue came from the checkBotVisibility middleware that checks whether or not the bot is accessible (mounted). It contains an exception for the /env route and placeholder bots (___). Meaning that we were missing the exception for the public-env route.