forked from dennisreimann/masq
-
Notifications
You must be signed in to change notification settings - Fork 2
Rails 5.2 #6
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
Open
pboling
wants to merge
53
commits into
bardbess:master
Choose a base branch
from
ruby-openid:rails-5-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rails 5.2 #6
Conversation
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
Update gemfile for rails 4
o Update Gemfile and gemspec o Update dummy env and change to sqlite for tests o Comment out model strong parameters moved to controllers instead
Update gemfile and gemspec to support rails 4.1
This was preventing tests from running. Fixed warning in assert_match server controller test
Hopefully travis can find my fixtures now
Update gemfile for Rails 4.2
Update bin file rename depricated before/after_filters Fix on tests so they run Gemfile updates
Remove deprication warnings from tests
Fix on permitted openid parameters Fix on saving parameters for an OpenID request Fix on site parameters correctly permitted
Update code removing depricated calls - delete_all should not have arguments - render text: has been depricated
remove find_by and replace with where first
- Kill asset pipeline
🚚 Rename to masq2
Upstream rails 5.1 fixes
- drop-in replacement for ⚰️ruby-openid⚰️
Rails 5.2.8.1 is a security patch release to fix CVE-2022-32224. See: https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017 The patch (Rails v5.2.8.1) causes an error with `masq` v0.3.4 (... actually it doesn't work at all on Rails v5, but some forks have been fixed): ``` Psych::DisallowedClass: Tried to load unspecified class: ActiveSupport::HashWithIndifferentAccess ``` when serializing a Hash the way we had done in previous versions `app/models/masq/open_id_request.rb`: ```ruby serialize :parameters, Hash ``` so we instead switch to serializing as JSON: ```ruby serialize :parameters, JSON ``` If an implementation needs to continue using the serialized Hash, you will need to override the definition by reopening the model, and adding: ```ruby serialize :parameters, Hash ``` In addition, one of the following is also needed. 1. Simple, but insecure fix, which reverts to previous unpatched behavior is: ```ruby Rails.application.config.active_record.use_yaml_unsafe_load = true ``` 2. More complex, and a bit less insecure fix, is to explicitly list the allowed classes to serialize: ```ruby Rails.application.config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, HashWithIndifferentAccess] ```
- switch to require_relative
…ite3Adapter.represent_boolean_as_integer` set to false is deprecated
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.
Rails 5.2.8.1 is a security patch release to fix CVE-2022-32224.
See: https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
The patch (Rails v5.2.8.1) causes an error with
masqv0.3.4(... actually it doesn't work at all on Rails v5, but some forks have been fixed):
when serializing a Hash the way we had done in previous versions
app/models/masq/open_id_request.rb:so we instead switch to serializing as JSON:
If an implementation needs to continue using the serialized Hash,
you will need to override the definition by reopening the model, and adding:
In addition, one of the following is also needed.
Simple, but insecure fix, which reverts to previous unpatched behavior is:
More complex, and a bit less insecure fix, is to explicitly list the allowed classes to serialize: