Environment-based configuration files not being loaded correctly #1
Labels
No labels
Bug
Cannot Resolve
Completed
Enhancement
Important
Question
Resolved
Security Issue
Suggestion
Todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Nosial/configlib#1
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Configuration library is not correctly handling the environment variables, which leads to incorrect file paths being used when loading configuration files. This resulted in warnings being issued that configuration files did not exist, even when the correct paths were provided via environment variables.
assigned to @netkas
The
Configuration->__construct()
method was sanitizing the name of the configuration to be used and fetching the corresponding environment variable correctly. However, it was then using the name of the environment variable, rather than its value, when checking if the configuration file existed and when setting the path to the configuration file.The bug has been fixed by using the value of the environment variable, rather than its name, when checking if the configuration file exists and when setting the path to the configuration file. The affected lines of code are within the
Configuration->__construct()
method.mentioned in commit
a3c04e1c36
mentioned in commit
5afae885db