Closed bogdanvlviv closed 6 years ago
During upgrade Rails from 4.2 to 5.0 I'd got a test failure that show that inheritance_column attr isn't protected anymore.
inheritance_column
After debugging I found that we have overridden subclass_from_attributes? to protect that column. Since Rails 5.0 that method is removed from Rails codebase that causess that issue, see https://github.com/rails/rails/commit/3da890f891b116218c10d9b049dba23d15d416cf
subclass_from_attributes?
In order to fix this bug we should override subclass_from_attributes instead.
subclass_from_attributes
Overriding of subclass_from_attributes?, and subclass_from_attrs should be removed since protected_attributes_continued dropped support of Rails < 5, see https://github.com/Current-RMS/protected_attributes_continued/blob/master/CHANGELOG.md#130
subclass_from_attrs
protected_attributes_continued
Since it is security fix I think we should release 1.3.1 with that fix too.
Awesome thank you for this. Sorry for the delay, turns out I had my GitHub emails turned off.
During upgrade Rails from 4.2 to 5.0 I'd got a test failure that show that
inheritance_column
attr isn't protected anymore.After debugging I found that we have overridden
subclass_from_attributes?
to protect that column. Since Rails 5.0 that method is removed from Rails codebase that causess that issue, see https://github.com/rails/rails/commit/3da890f891b116218c10d9b049dba23d15d416cfIn order to fix this bug we should override
subclass_from_attributes
instead.Overriding of
subclass_from_attributes?
, andsubclass_from_attrs
should be removed sinceprotected_attributes_continued
dropped support of Rails < 5, see https://github.com/Current-RMS/protected_attributes_continued/blob/master/CHANGELOG.md#130Since it is security fix I think we should release 1.3.1 with that fix too.