Commit Graph

24 Commits

Author SHA1 Message Date
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
r888888888
af6ab74f8d support dedicated image servers 2018-01-03 13:32:50 -08:00
evazion
c1834ab8dd Inherit models from ApplicationRecord instead of ActiveRecord::Base. 2017-06-16 13:28:31 -05:00
r888888888
268d0450bc additional fixed for amazonbackup helper methods 2017-06-05 13:38:10 -07:00
r888888888
2878d1533d set acl for amazonbackup helper methods 2017-06-05 13:28:39 -07:00
r888888888
e16320a376 fix paths of large sized images on s3 backup 2017-06-05 13:07:51 -07:00
r888888888
12e4a82db3 fix upload tags report 2017-02-28 16:28:58 -08:00
r888888888
2ebdfd7ab3 add s3 methods to amazonbackup 2017-02-24 14:00:59 -08:00
r888888888
b57b54113f add cdn hosted flag to posts 2017-02-07 17:26:16 -08:00
r888888888
d5fa4b46e3 * refactor aws config options
* fix aws calls in savedsearch
* remove unused scripts
2015-12-28 12:26:20 -08:00
r888888888
79378f9210 fix typo 2015-07-16 15:24:57 -07:00
r888888888
3b54646245 fix s3 scripts 2015-07-15 18:07:20 -07:00
r888888888
2c8cacd50e switch aws client libraries 2015-07-13 18:17:31 -07:00
evazion
5754dcb260 Fix file extension when backing up ugoira to S3. 2014-10-19 02:30:03 -07:00
Toks
a84850c094 WebM support 2014-06-30 17:19:37 -04:00
r888888888
fad0ab7c93 fixes #2133 2014-04-16 17:43:34 -07:00
r888888888
2e507a076c increase amazonbackup limit 2014-01-13 11:03:15 -08:00
r888888888
d594d525d6 fix amazonbackup 2014-01-10 17:20:57 -08:00
r888888888
ca26bf0f3b hard code s3 server 2014-01-10 16:50:56 -08:00
r888888888
782bdd4627 fix amazonbackup script, trap on epipe exception for db backup 2014-01-10 16:35:40 -08:00
r888888888
ce55d57728 fix amazon backup script 2013-11-19 15:40:49 -08:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
7269ec0076 removed small image support 2012-03-13 18:28:32 -04:00
albert
c8067a4691 fixing jobs 2011-08-15 19:41:50 -04:00