Commit Graph

6842 Commits

Author SHA1 Message Date
Albert Yi
19cc8ebf9e fixes #3630 2018-04-12 16:02:41 -07:00
evazion
af9a09c2cb Fix #3626: Artist creation page doesn't autocomplete the name anymore. 2018-04-12 16:23:59 -05:00
Albert Yi
5546d9e98b fixes #3627 2018-04-12 14:20:02 -07:00
Albert Yi
b99600bbbe fixes #3625 2018-04-12 14:12:27 -07:00
Albert Yi
c785d00eb6 remove window.console.log 2018-04-12 13:58:28 -07:00
Albert Yi
9975b2dd35 don't require saved_search params when creating a new saved search 2018-04-12 13:56:02 -07:00
Albert Yi
26a2e60d04 fixes #3623 2018-04-12 13:36:56 -07:00
Albert Yi
883b36ac2e fixes #3620 2018-04-12 13:00:48 -07:00
Albert Yi
cd88a8df9f fixes #3620 2018-04-12 13:00:48 -07:00
evazion
ad1ed5a510 Fix #3623: Changes to existing notes aren't being saved. 2018-04-12 14:52:50 -05:00
Albert Yi
37ba6714d1 fixes #3617 2018-04-12 12:11:27 -07:00
Albert Yi
d747ffc640 fixes #3621 2018-04-12 12:09:33 -07:00
Albert Yi
c9fe91c74b fix base dir for image distribute rake task 2018-04-12 10:48:53 -07:00
Albert Yi
03e2a2ca3b add rake task for distributing images using storage managers 2018-04-12 10:40:24 -07:00
Albert Yi
25f371c8c6 Merge branch 'master' of github.com:r888888888/danbooru 2018-04-12 09:53:02 -07:00
Albert Yi
e4e79c027e Merge pull request #3618 from evazion/fix-rails-5.1-bugs
Fix rails 5.1 bugs
2018-04-12 09:44:18 -07:00
evazion
159b0e8a22 tests: add daily & weekly maintenance tests. 2018-04-11 22:33:28 -05:00
evazion
4233d2149f Fix delete_all / destroy_all calls. 2018-04-11 22:33:11 -05:00
Albert Yi
b0ac895964 remove unused attr_accessor 2018-04-11 14:09:45 -07:00
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
Albert Yi
a25629bff9 fixes #3594 2018-04-11 11:14:58 -07:00
Albert Yi
c46996f937 Merge pull request #3616 from evazion/fix-deviantart-api
Fix #3260: Exception when uploading certain DeviantArt posts
2018-04-10 16:54:44 -07:00
evazion
ab25e73cd7 deviantart: replace html scraper with api client (#3260). 2018-04-09 20:53:14 -05:00
evazion
2d6b7177de deviantart: add api client. 2018-04-09 20:53:06 -05:00
Albert Yi
485c3b01c7 add uploader-id and top-tagger-id data attrs to post previews 2018-04-09 11:12:07 -07: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
Albert Yi
5f33238074 Merge pull request #3612 from evazion/fix-iqdb-errors
Improve IQDB error handling
2018-04-09 10:53:40 -07:00
evazion
40827442c7 Fix #3614: IQDB: don't index placeholder thumbnails. 2018-04-08 12:15:24 -05:00
evazion
2cbec785ea Fix #3613: Broken preview images for flash files. 2018-04-08 11:49:30 -05: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
4097305e52 StorageManager::Hybrid#open_file: fix typo. 2018-04-07 21:06:38 -05:00
evazion
ad66b8abc9 common.js: show error on ajax failures.
Make `link_to ..., remote: true` ajax requests display an error notice on failure.
2018-04-07 18:04:43 -05:00
evazion
8de20d2b36 Iqdb::Download.find_similar: raise on iqdb errors.
* Raise an error on iqdb errors instead of returning no matches.
* Include the iqdb api response in the error response.
2018-04-07 18:03:10 -05:00
evazion
b88a66dd30 Iqdb::Download.find_similar: simplify error handling.
Raise errors immediately to avoid deeply nested if-else statements.
2018-04-07 18:03:10 -05:00
evazion
d8142a6c21 iqdb_queries_controller.rb: simplify show / check actions.
* Combine create_by_post + create_by_url. Rename to find_similar.
* Move iqdb enabled check to find_similar.
2018-04-07 18:03:01 -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
01eda51020 tests: add webm/mp4 upload tests. 2018-04-06 19:56:17 -05:00
evazion
e7eee185f7 Fix #3607: Webm / mp4 uploads broken. 2018-04-06 19:55:26 -05:00
Albert Yi
fc344e589d potential fix for #3604 2018-04-06 16:14:01 -07:00
Albert Yi
5a87fcfde3 Merge pull request #3602 from evazion/feat-link-userscripts
Add about:userscripts to site map.
2018-04-05 15:19:28 -07:00
evazion
a03270dbf1 Add about:userscripts to site map. 2018-04-05 16:52:46 -05:00
evazion
9b62b78183 Fix #3601: Broken URLs in /posts.atom feed. 2018-04-05 16:46:23 -05:00
evazion
a432980f85 Fix "wrong number of arguments (given 3, expected 2)" in Post#file_url. 2018-04-05 15:33:47 -05:00
Albert Yi
7d745ac93f Merge pull request #3598 from evazion/fix-3597
Possible fix for #3597: Poor performance since last deploy
2018-04-05 13:11:21 -07:00
Albert Yi
916c73b7a8 Merge branch 'master' of github.com:r888888888/danbooru 2018-04-05 12:51:36 -07:00
Albert Yi
bf23a976e3 fix bug with async tagger check 2018-04-05 12:51:29 -07:00
evazion
8e457c7331 Disable user:<name> blacklists (temp fix for #3596). 2018-04-05 14:38:44 -05:00
evazion
084fcd91ed Only generate tagged filenames for URLs on post show pages (#3597).
Don't generate tagged filenames for urls in the data attributes on
thumbnails, or in the /posts.json api.
2018-04-05 14:20:37 -05:00
evazion
14977397fb Fix "ArgumentError - wrong number of arguments" during tagging. 2018-04-05 13:27:37 -05:00