Commit Graph

831 Commits

Author SHA1 Message Date
Albert Yi
6839249e9d add logic for persisting pixiv sessions in tests 2018-05-10 13:59:57 -07:00
Albert Yi
72f319ccf3 rename lambda references to use shorthand syntax 2018-05-10 11:18:02 -07:00
Albert Yi
3c894eaf86 increase timeout for pixiv api connections 2018-05-10 09:49:46 -07:00
Albert Yi
0d7aa921d6 add hourly check for delayed job errors 2018-05-09 17:33:02 -07:00
Albert Yi
c658e7d22a add comments for mechanize patch 2018-05-09 16:51:12 -07:00
Albert Yi
5bca31bad1 add retry monkey patch for mechanize 2018-05-09 16:45:03 -07:00
Albert Yi
780d899c85 move passwords to env 2018-05-09 15:15:33 -07:00
Albert Yi
c144159dd9 fix tests 2018-05-09 14:36:03 -07:00
Albert Yi
59dde72924 fix pixiv tests, install ffmpeg 2018-05-09 14:11:34 -07:00
Albert Yi
0f2e6a9a1b fix tests 2018-05-09 12:45:37 -07:00
Albert Yi
79ea6f7e6c Add Docker and Travis config files to enable CI tests
Also fixes some Rails 6.0 deprecation warnings
2018-05-09 09:56:38 -07:00
Albert Yi
3b8a1703ff Merge pull request #3701 from evazion/fix-3579
Fix #3579: Add post approval index
2018-05-07 17:36:41 -07:00
evazion
7c1d5e25fb post approvals: add index page + search options (fix #3579). 2018-05-05 14:00:49 -05:00
evazion
c7492343ce String: add truthy? & falsy? core extensions.
* Add `truthy?` and `falsy?` core extensions to String.

* Use `truthy?` and `falsy?` to replace ad-hoc parsing of boolean
  parameters in various places.
2018-05-03 19:57:14 -05:00
r888888888
0d6cf961a8 disable js compression on staging 2018-04-30 11:34:21 -07:00
Albert Yi
b93b28d049 add email to cronjobs 2018-04-27 15:06:36 -07:00
Albert Yi
664a3f02e2 fixes for failed cron maintenance tasks
* update rails scripts for 5.2
* system dmails should be scoped to system
* fix broken url generator in forum notices
2018-04-27 15:01:40 -07:00
Albert Yi
f2b525a6d2 Implement forum topic voting and tag change pruning (#3580) 2018-04-26 15:31:06 -07:00
Albert Yi
4b6019d6ad fixes #3668 2018-04-26 10:25:24 -07:00
evazion
09462aefeb Fix #3522: Enable HSTS. 2018-04-19 01:39:46 -05:00
evazion
2fd91bfa20 Load danbooru_default_config.rb earlier.
Load danbooru_default_config.rb inside application.rb instead of in an
initializer so that it's available as soon as possible.
2018-04-19 00:49:50 -05:00
evazion
909c9aad5a Fix user id cache expiration.
Use a delayed job instead of a HTTP request to invalidate the user id
cache on both servers.
2018-04-19 00:45:51 -05:00
evazion
0f883e7009 Fix #3649: Replace highlighting of "photoshop" with "third-party_edit" in modqueue. 2018-04-17 17:19:18 -05:00
evazion
17aabaca29 modqueue: move quality warning tags into config file. 2018-04-17 17:15:06 -05:00
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
evazion
2d6b7177de deviantart: add api client. 2018-04-09 20:53:06 -05:00
Albert Yi
23fef71346 Merge pull request #3609 from evazion/fix-3603
Fix #3603: Unable to view images on Hijiribe/Sonohara when Danbooru is blocked
2018-04-09 10:56:00 -07:00
evazion
5f930630e5 danbooru_default_config.rb: allow setting boolean options in env vars.
Allow setting e.g. `aws_s3_enabled?` with DANBOORU_AWS_S3_ENABLED="true"
in the .env file.
2018-04-08 11:24:53 -05:00
evazion
1b14545d0d Fix #3603: Unable to view images on Hijiribe/Sonohara when Danbooru domain is blocked. 2018-04-06 21:25:14 -05:00
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
evazion
c0c41dd369 uploads: add limits on max image dimensions. 2018-03-29 19:24:41 -05:00
evazion
dc9b7e5bda Fix #3582: Switch from ImageMagick to libvips 2018-03-28 17:15:57 -05:00
evazion
f0bf1bc66e posts: use storage manager to backup files.
* Perform backups synchronously inside `distribute_files` instead of
  asynchronously in `queue_backup`. Asynchronous backups assumed that
  files are stored on the local filesystem, which isn't true in general.

* Remove obsolete backup service classes.
2018-03-20 19:49:06 -05:00
evazion
6d0d1a3ce9 posts: use storage manager to build file urls. 2018-03-20 19:49:06 -05:00
evazion
b0c7d9c185 Add storage managers (local, sftp, s3, hybrid). 2018-03-20 19:49:06 -05:00
evazion
feaad0bbd0 nginx.conf: fix inconsistent client_max_body_size. 2018-02-27 18:22:37 -06:00
r888888888
689b5690bf fixes #3560 2018-02-22 11:15:42 -08:00
r888888888
146b27f4cf update rbenv version 2018-01-30 12:05:38 -08:00
r888888888
2c4a0cd79d set rbenv path for staging 2018-01-30 12:03:03 -08:00
r888888888
f83480cc8a hard core path to rbenv root 2018-01-22 18:04:55 -08:00
r888888888
97fe82e74b fix default naming scheme for large file urls 2018-01-18 12:52:17 -08:00
r888888888
b60f4d62fd delegate post url generation to config 2018-01-04 13:06:52 -08:00
evazion
7c8cfc1e31 Fix #3492: Add corrupted_image to list of default removed tags for replacements. 2018-01-03 17:44:59 -06:00
r888888888
af6ab74f8d support dedicated image servers 2018-01-03 13:32:50 -08:00
r888888888
4a80d6c337 refactor User#validate_sock_puppet to disable for tests 2018-01-02 14:32:38 -08:00
Albert Yi
99c0c4ade6 Merge pull request #3479 from BrokenEagle/feat-add-iqdb-page
Initial add of IQDB standalone page
2018-01-02 10:29:27 -08:00
BrokenEagle
36ef8b4db3 Initial add of IQDB standalone page 2017-12-30 00:11:08 -08:00
r888888888
c3aff42458 add defaults for cloudflare keys 2017-12-29 17:15:39 -08:00
Albert Yi
2e0e8e1365 Merge pull request #3456 from BrokenEagle/fix-3455
Fix 3455: Convert tag category Javascript/CSS assets to ERB
2017-12-25 13:22:04 -08:00
BrokenEagle
d54b26c61d Convert tag category Javascript/CSS assets to ERB 2017-12-24 17:01:17 -08:00