Skip to content
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

Pull in latest changes from 10-0-stable #164

Merged
merged 12 commits into from
Oct 13, 2024
Merged

Pull in latest changes from 10-0-stable #164

merged 12 commits into from
Oct 13, 2024

Conversation

mvz
Copy link
Member

@mvz mvz commented Oct 13, 2024

  • Limit accepted parameters for Sidebar update in Admin
  • Use known set of allowed attributes when autosaving an Article
  • Permit only valid settings keys when updating blog settings
  • Use default describe blocks for Admin::NotesController specs
  • Limit assigned attributes when creating and updating Notes
  • Limit allowed SEO settings params

mvz added 12 commits October 13, 2024 10:09
Each sidebar generates a form containing just the fields defined in
sidebar.fields. So it is not necessary, and also unsafe, to permit just
any parameter. Instead, permit only the defined fields.
Limit accepted parameters for Sidebar update in Admin
The attributes of an Article are known, so there is no need to permit
all parameters. Since it is also unsafe, replace it with the already
known set of good parameters defined in #update_params.
Use known set of allowed attributes when autosaving an Article
The settings controller is only for updating blog settings. Instead of
permitting all parameters, which is unsafe, limit permitted parameters
to those that are actually blog settings.
Permit only valid settings keys when updating blog settings
Using #permit! is unsafe and not necessary, since we have a fixed set of
attributes used in the notes form. Use #permit with a list of attribute
names instead.
Limit assigned attributes when creating and updating Notes
This limits the set of parameters in the Admin::SeoController to the set
of valid blog settings, similar to AdminSettingsController. In addition,
it allows the extra :custom_permalink key to facilitate the options plus
text field construction in the SEO settings form. This eliminates the
use of the unsafe #permit! method.
@mvz mvz merged commit 0277a00 into master Oct 13, 2024
8 checks passed
@mvz mvz deleted the pull-in-10-0-stable branch October 13, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant