You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify that DATABASE_URL can not be empty if allowlist is used - #728
This clarity would be helpful; I found myself in a situation with changed configuration, long story short, someone working on the project had previously set this particular application up used the default database.yml configuration with a change to use ENV.fetch(ENV[',...), which meant that DATABASE_URL wasn't set, but the configuration was setting the :url attribute from the fallback. The changes recently in configuration allow optionally pulling a .env.base in development/test from some common place, which set the DATABASE_URL to exactly the same thing as the fallback. And the configuration changes assumed pulling of the .env.base and set the whitelist in rails_helper.rb, leaving me astonished that I wasn't able to run specs because my DATABASE_URL wasn't whitelisted. Well of course, nil != /[regex]/, so I ultimately figured it out.
All of that said, it's also clear that a configuration using no DATABSE_URL environment variable wouldn't be protected by this, though I'm not sure how common that is in the wild anymore. (ref: #684)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.