Commit Graph

61 Commits

Author SHA1 Message Date
evazion
868a2256d1 jobs: migrate file deletion jobs to ActiveJob. 2019-08-16 20:49:35 -05:00
Albert Yi
d8aabff77b remove post keeper references 2019-01-31 15:45:06 -08:00
evazion
8408c0bf80 Fix #3815: Adjust notes positions/sizes after post replacement
Bug: Notes weren't rescaled when the 'final_source' field was given
during replacement.

The cause was that the notes were rescaled after the source was saved,
but saving the source clobbered `image_{width,height}_before_last_save`
inside `rescale_notes`.

Regressed in b0c2ddba.
2018-12-16 13:55:35 -06:00
evazion
a20eba9ef7 Fix #3983: Uploads: NoMethodError - undefined method `>=' for nil:NilClass
* Rename Upload#download_for_upload to #get_file_for_upload.

* Fix #get_file_for_upload to raise error if no file or source url was given.

* Fix javascript upload validation to disallow submitting form if file is
  not present and the source is not an url.
2018-11-11 17:12:39 -06:00
evazion
e10c6c6a30 Fix #3982: Uploads: URI::InvalidURIError - URI must be ascii only. 2018-11-11 12:17:58 -06:00
Albert Yi
e5f76b98ff switch upload service test to use raikou1 image 2018-10-25 12:57:54 -07:00
Albert Yi
19a84993ca fix video upload spec 2018-10-25 11:44:54 -07:00
Albert Yi
12b88f7f97 fixes #3960 2018-10-17 15:37:47 -07:00
evazion
f6c928e660 tests: fix upload service tests.
Fix regression in a45bd52e9. Delay jobs so that that the dead upload
pruner doesn't immediately prune new uploads.
2018-10-04 21:52:18 -05:00
evazion
215591403e uploads: fix 'rating:safe' not assigning the rating (#3929). 2018-10-01 11:09:00 -05:00
evazion
3414d27c78 post replacements: fix self-replacements; don't swallow upload errors. 2018-09-23 10:51:16 -05:00
evazion
39fe5273a9 Fix #3917: Uploads: validate file before resizing/distributing. 2018-09-23 10:51:16 -05:00
Albert Yi
79f53c25ea skip tests that throw net::opentimeout 2018-09-17 17:00:46 -07:00
Albert Yi
6dd64da9ba fix invalid content type leaving upload stuck in preprocessing status (#3896) 2018-09-13 13:50:18 -07:00
Albert Yi
5f06952ed1 fix upload service test 2018-09-11 15:54:06 -07:00
Albert Yi
e0e85a3139 skip additional tests failures that are caused by networking issues 2018-09-11 13:43:34 -07:00
evazion
c2cf6a5441 Fix #3871: Autocomplete can return duplicate tags. 2018-09-05 18:56:30 -05:00
Albert Yi
3025db66d7 switch fuzzy autocomplete to spellcorrect intent 2018-09-05 09:41:25 -07:00
Albert Yi
314341773c fix tests 2018-09-04 18:23:49 -07:00
Albert Yi
b0bd20c436 fixes #3855 2018-09-04 11:34:46 -07:00
evazion
d6235d6f9e nijie: add canonical url tests. 2018-08-31 23:23:15 -05:00
evazion
a68d12bd45 autocomplete: fix case sensitivity (#3854).
ref: https://github.com/r888888888/danbooru/issues/3854#issuecomment-417366253:
2018-08-30 17:38:29 -05:00
Albert Yi
66e413b540 Adds fuzzy string matching and prefix matching 2018-08-28 16:41:52 -07:00
Albert Yi
762dc3da24 Refactor sources 2018-08-24 12:10:51 -07:00
r888888888
334d8b7c6f Add alt_source field on uploads to deal with twitter galleries 2018-08-04 16:32:15 -07:00
Albert Yi
ea4e7f1970 Expire unused aliases and implications after 2 years of inactivity 2018-08-01 16:54:48 -07:00
Albert Yi
6ce8c72053 assign after source url for uploads 2018-07-31 10:10:50 -07:00
r888888888
cc7a66438f expose recommended posts to everyone 2018-07-23 15:05:43 -07:00
Albert Yi
6943c70a32 potential fix for #3569 2018-07-20 10:55:39 -07:00
Albert Yi
a9896031df more fault tolerance for uploads 2018-07-05 15:59:06 -07:00
Albert Yi
99807580d5 add cropped support for video uploads 2018-07-03 16:37:53 -07:00
Albert Yi
7f895bd91f fix specs 2018-07-02 15:19:19 -07:00
Albert Yi
9a522d9fef for upload service, move md5 validation to upload/post. exclude self when doing a self replacement. 2018-07-02 13:26:47 -07:00
Albert Yi
4836804cae bubble up upload validation errors during replacement
restore missing UploadService::Replacer tests
addresses #3761
2018-06-25 15:04:29 -07:00
Albert Yi
64446d49e1 add image cropping support 2018-06-22 14:41:57 -07:00
Albert Yi
cc24b0a54f fix bug with copy-pasted urls in uploads/new erroring out 2018-06-18 10:23:01 -07:00
Albert Yi
06f47cc84d fix test 2018-06-15 14:45:36 -07:00
Albert Yi
b0c2ddba8b update tests 2018-06-14 17:52:41 -07:00
Albert Yi
0e6c358701 add drag and drop file uploads w/async processing
[skip ci]
2018-06-14 17:52:41 -07:00
Albert Yi
fdd7582fb0 add support for upload preprocessing 2018-06-14 17:52:41 -07:00
Albert Yi
0ae9230caa add test for postkeepermanager reconnect 2018-05-09 17:40:07 -07:00
Albert Yi
99012ff342 fix tests 2018-05-09 11:59:51 -07:00
Albert Yi
f2b525a6d2 Implement forum topic voting and tag change pruning (#3580) 2018-04-26 15:31:06 -07: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
r888888888
3657cacd17 * post keeper is calculated synchronously
* add fallback mechanism in case archive service is not up
* pass along most recently added tags to any keeper calculation
2018-03-08 16:00:44 -08:00
r888888888
0c5dcbbf68 Revert "Revert "implement post keepers""
This reverts commit b9fcfe0442.
2018-03-06 18:04:31 -08:00
Albert Yi
b9fcfe0442 Revert "implement post keepers" 2018-02-07 12:28:56 -08:00
r888888888
32cc508edb hide uploader information on posts/show page, add keeper information 2018-02-01 14:38:03 -08:00
r888888888
4a80d6c337 refactor User#validate_sock_puppet to disable for tests 2018-01-02 14:32:38 -08:00
r888888888
502f1298a9 fix unit tests 2017-11-20 16:30:07 -08:00