-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed proxy variable feature. (#60) #148
Conversation
Expanding variables automatically on a read is an anti-pattern. Variable expansion by the shell should only be done when the value is inserted inot the environment, but the vlaue should be treated as opaque data. Any processing or interpretation of the variable should be done by the appliaction, not by the access method.
FYI I added a way to make this optional #145 |
Interpolation of environment variables on read is a very risky behavior. Even if there's a valid use case for it (which is debatable), it should be disabled by default. |
Thank you A lot of people use the proxy values, so we can't remove without a lot of issues of backports. # .end file:
# FOO="$BRIAN"
# BAR='$BRIAN'
# ZAP=$BRIAN
# BRIAN=brian
# if quoted the proxy is not evaluated
>>> print env('FOO'), env('BAR')
('$BRIAN', '$BRIAN')
>>> print env('ZAP')
brian To do that we should edit See #145 |
This is a reasonable approach. Thank you. |
another aspect of this, that i'd consider broken with proxy variables are default values and that would not be improved with the suggested approach. consider the following test:
here the environment variable came across this issue when using django's
it seems to me like a feature, that does more harm, than good and should be explicitly enabled; would suggest a semantic major version update with breaking change. |
@fdemmer The |
I just got hit by this and was very confused. The secret key that got generated for me started with a |
PR was closed by mistake. I can't reopen it since the repository that submitted this PR has been deleted. I'll review this PR and give feedback soon. |
Expanding variables automatically on a read is an anti-pattern.
Variable expansion by the shell should only be done when the
value is inserted into the environment, but the vlaue should be
treated as opaque data. Any processing or interpretation of the
variable should be done by the appliaction, not by the access
method.