kyubisation / angular-server-side-configuration

Configure an angular application at runtime on the server
Apache License 2.0
42 stars 6 forks source link

feat: add searchPattern as an option and restrict default search pattern #75

Closed kyubisation closed 1 year ago

kyubisation commented 1 year ago

With version 15, the behavior of the environment variable lookup changed to try to find occurrences in the whole workspace. This could lead to a potential information disclosure vulnerability, by exposing environment variables meant for a backend/Node.js application. This PR mitigates this possibility, by restricting the lookup path of environment variables to sourceRoot of the related angular.json project and excluding files having server in their name (a common pattern for universal apps).