-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Make AC::Params.permit_all_parameters thread safe #18003
Merged
rafaelfranca
merged 1 commit into
rails:master
from
sikachu:permit_all_parameters-thread-safety
Dec 12, 2014
Merged
Make AC::Params.permit_all_parameters thread safe #18003
rafaelfranca
merged 1 commit into
rails:master
from
sikachu:permit_all_parameters-thread-safety
Dec 12, 2014
Conversation
This file contains 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
As discussed in rails#16299[1], this attribute is not thread safe and could potentially create a security issue. [1]: rails#16299 (comment)
This may also needed to be backported to 4-2-stable. |
rafaelfranca
added a commit
that referenced
this pull request
Dec 12, 2014
…afety Make AC::Params.permit_all_parameters thread safe
rafaelfranca
added a commit
that referenced
this pull request
Dec 12, 2014
…afety Make AC::Params.permit_all_parameters thread safe
rafaelfranca
added a commit
that referenced
this pull request
Dec 12, 2014
…afety Make AC::Params.permit_all_parameters thread safe
chancancode
added a commit
that referenced
this pull request
Dec 19, 2014
…thread-safety" This reverts commit da5cc10. Fixes #18091 See also #18003 (comment)
chancancode
added a commit
that referenced
this pull request
Dec 19, 2014
…thread-safety" This reverts commit da5cc10. Fixes #18091 See also #18003 (comment)
chancancode
added a commit
that referenced
this pull request
Dec 19, 2014
…thread-safety" This reverts commit da5cc10. Fixes #18091 See also #18003 (comment)
Reverted in 5923ee6 and added a note about thread safety. If we really want to support mutating this at runtime, we can do something along the lines of... def self.permit_all_parameters
if Thread.current.key?(:action_controller_permit_all_parameters)
Thread.current[:action_controller_permit_all_parameters]
else
# Inherit from config.action_controller.always_permitted_parameters or elsewhere
end
end
def self.permit_all_parameters=(value)
Thread.current[:action_controller_permit_all_parameters] = value
end Not sure if we need to though. |
sivagollapalli
pushed a commit
to sivagollapalli/rails
that referenced
this pull request
Dec 29, 2014
…ters-thread-safety" This reverts commit da5cc10. Fixes rails#18091 See also rails#18003 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As discussed in #16299(1), this attribute is not thread safe and could potentially create a security issue.