evazion
82fbb19e0f
users: drop unused code.
2019-08-18 11:24:42 -05:00
evazion
27a118dfc8
tests: drop timecop gem.
2019-08-18 11:24:41 -05:00
evazion
145894fe8b
tests: fix alias/implication tests.
2019-08-17 02:41:07 -05:00
evazion
868a2256d1
jobs: migrate file deletion jobs to ActiveJob.
2019-08-16 20:49:35 -05:00
evazion
2b6361369e
jobs: migrate aliases/implications to ActiveJob.
2019-08-16 20:49:35 -05:00
evazion
2bbdc5d143
jobs: migrate saved searches to ActiveJob.
...
* Fix tests to run the searches for real instead of mocking everything out.
* Fix SavedSearch.populate to only use the read only database in
production because in breaks things in tests. Specifically:
the posts get created in one db connection but searched for in
another, but the second transaction doesn't see the uncommitted posts
in the first transaction, so the search doesn't work.
2019-08-16 20:49:35 -05:00
evazion
a68db501c2
jobs: migrate related tag updates to ActiveJob.
2019-08-16 20:49:35 -05:00
evazion
24eb1b155f
jobs: migrate pool category updates to ActiveJob.
2019-08-16 20:49:34 -05:00
evazion
4e8b3d9310
jobs: migrate user deletions to ActiveJob.
2019-08-16 20:49:34 -05:00
evazion
822dce20ed
jobs: add base ApplicationJob.
2019-08-16 20:49:34 -05:00
evazion
817f5ecf9c
jobs: drop favgroup expunge job.
...
Make `Post#expunge!` remove favgroups synchronously.
2019-08-16 20:49:34 -05:00
evazion
bb157f5d5b
models: drop various unused #named methods.
2019-08-15 19:18:19 -05:00
evazion
b9d35eaf2c
Fix #3272 : Unicode tags are still being allowed.
...
* Don't allow adding tags with invalid names when they already exist in
the tags table.
* If an invalid tag is added, show an warning and ignore the tag instead
of failing with a hard error.
* Move the _(cosplay) tag validation into the tag name validator.
2019-08-15 16:42:23 -05:00
evazion
5f1226ca92
Rename maintenance.rb -> danbooru_maintenance.rb.
...
Fixes random test failures caused by ambiguous constant lookup issues
(the `Maintenance` module name was used in multiple conflicting places).
2019-08-15 00:36:25 -05:00
evazion
247d825618
tests: fixup Post.fast_count test ( a6163258b).
2019-08-15 00:36:25 -05:00
evazion
d657624a80
Revert "application controller: fix errors in normalize_search."
...
This reverts commit 28a88cfa85 .
2019-08-14 01:46:43 -05:00
evazion
d0428da120
sessions: remove nonexistent GET /session route.
2019-08-14 01:46:43 -05:00
evazion
dbfd6185f1
posts: fix error on /posts?md5=<does_not_exist>.
2019-08-13 21:30:21 -05:00
evazion
0f98631908
wiki pages: fix error in /wiki_pages/does_not_exist.json
2019-08-13 21:30:21 -05:00
evazion
28a88cfa85
application controller: fix errors in normalize_search.
...
Fix exceptions in `normalize_search` on e.g. `https://danbooru.donmai.us/users?search=blah `.
Caused when the `search` param is not a hash.
2019-08-13 21:30:20 -05:00
evazion
b50b7f2a91
tag aliases: fix bug in alias resolution.
...
Bug: Searching for an aliased tag returns an empty page instead of
showing the results for the real tag.
Cause: The query parsing code runs the search string through
`.mb_chars.downcase` before calling `TagAlias.to_aliased`, so the input
to `to_aliased` is actually a ActiveSupport::Multibyte::Chars object.
This breaks the `aliases[name]` hash lookup because `name` is not a
plain string.
Fixup for c7bcce429 .
2019-08-12 18:10:49 -05:00
evazion
a71899559a
tests: fix ip ban test regression.
2019-08-12 14:17:00 -05:00
evazion
a28a58c1f6
tests: add more posts/index controller tests.
2019-08-12 13:38:45 -05:00
evazion
7316f41d1d
Fix #4106 : Allow moderators to IP ban subnets.
2019-08-12 02:12:56 -05:00
evazion
d76be490f2
Remove tag alias corrections controller tests (fixup 18a216c67).
2019-08-10 23:49:32 -05:00
evazion
18a216c67a
Fix #4130 : Remove tag alias corrections.
2019-08-10 22:46:49 -05:00
evazion
c7bcce429e
Fix #4129 : Remove tag alias caching.
2019-08-10 22:04:55 -05:00
evazion
35dfc704bc
application controller: fix bad file extension errors.
...
Fix requests with bad file extensions not always returning errors correctly:
* https://danbooru.donmai.us/posts.jpg
* https://danbooru.donmai.us/posts.blah
* https://danbooru.donmai.us/posts/bad.jpg
* https://danbooru.donmai.us/posts/bad.blah
2019-08-08 22:16:39 -05:00
evazion
7f482dc35b
deviantart: normalize wixmp.com sources to page urls.
...
Normalize sources like this:
https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/ab917938-d8c1-4b58-933d-0d38c390461f/ddcyi98-cbd39da2-f528-4b26-aadb-a16fe91442b2.jpg/v1/fill/w_1280,h_1760,q_100,strp/tifa_by_chubymi_ddcyi98-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7ImhlaWdodCI6Ijw9MTc2MCIsInBhdGgiOiJcL2ZcL2FiOTE3OTM4LWQ4YzEtNGI1OC05MzNkLTBkMzhjMzkwNDYxZlwvZGRjeWk5OC1jYmQzOWRhMi1mNTI4LTRiMjYtYWFkYi1hMTZmZTkxNDQyYjIuanBnIiwid2lkdGgiOiI8PTEyODAifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6aW1hZ2Uub3BlcmF0aW9ucyJdfQ.Uochlma4QJmLwL2ZGMmvTr4HMva4m4bCeF3vnyPSw4I
to this:
https://www.deviantart.com/chubymi/art/Tifa-807825644
on the sidebar of the posts show page.
2019-08-06 12:04:05 -05:00
evazion
a8896b664d
twitter: fix batch bookmarklet selecting wrong image.
...
Fix regression in 7e465aeda .
https://danbooru.donmai.us/forum_topics/9127?page=276#forum_post_158779
2019-08-06 10:42:45 -05:00
evazion
d0c28d79f0
tests: temp disable broken tests.
...
Broken by bug in shoulda-context-1.2.2. Uncomment after upgrading to
shoulda-context-2.0.0.
2019-08-05 13:41:06 -05:00
evazion
7e465aedae
Fix #4110 : New Twitter image urls are broken in bookmarklet.
2019-08-04 20:23:10 -05:00
evazion
9ecf36585c
nijie: update for new image urls.
...
Nijie moved from this:
https://pic03.nijie.info/nijie_picture/236014_20170620101426_0.png (page: https://www.nijie.info/view.php?id=218856 )
to this:
https://pic.nijie.net/03/nijie_picture/236014_20170620101426_0.png (page: https://www.nijie.info/view.php?id=218856 )
2019-08-04 17:49:54 -05:00
evazion
7c8c4e9f82
tests: fix null uploader_ip_addr exceptions in create(:post).
...
Caused by a change in FactoryBot 5. Associations in factories are now
constructed using the same strategy as the base object, meaning that
using `build` to construct an object will also construct the
associations using `build`. This meant that overriding `create` to do
`build` + `save` broke the way that associations were constructed.
https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#associations
2019-08-04 12:43:12 -05:00
evazion
39bd766b34
Fix #4053 : Add disapproval index improvements.
...
Add search form to /moderator/post/disapprovals.
2019-08-02 22:03:03 -05:00
evazion
6c69165780
Fix #4105 : IP bans leak banned IPs in /mod_actions.
2019-08-01 21:21:18 -05:00
evazion
065609ff4f
artists: prevent creating artist entries for non-artist tags ( #4107 , 2717).
...
Validate that artist entries belong to an artist tag. Don't allow
creating artist entries for character/copyright/meta tags, but do allow
entries for general tags (the gentag will be automatically changed to an
artist tag).
2019-08-01 20:20:06 -05:00
evazion
bcaefa0a7e
Fix #4107 : Can't create artist entry if tag already has a wiki #4107
2019-08-01 19:34:21 -05:00
Albert Yi
f95bcc7330
move safe_mode from Thread.current to RequestStore
2019-06-26 09:26:20 -07:00
Albert Yi
0a058dd52b
fixes #4080 : Status code 500 when disapproving through API
2019-05-17 12:09:03 -07:00
Albert Yi
04edc3f533
update factories + tests
2019-05-10 17:31:07 -07:00
Albert Yi
32b4e0a01e
update gems
2019-05-10 16:46:26 -07:00
Albert Yi
6612aa1af9
fix unit tests
2019-04-25 18:13:59 -07:00
Albert Yi
c18cf5480d
update uploadcontroller test
2019-04-16 16:26:38 -07:00
Albert Yi
6f4ca75bb1
try to handle deivantart images hosted on images-wixmp better
2019-04-16 13:55:26 -07:00
Albert Yi
eb8ce2e955
Revert "eliminate old algorithm for deviant art sources, fix canonical_url on deviantart"
...
This reverts commit 58ca52b43e .
2019-04-16 13:22:09 -07:00
Albert Yi
58ca52b43e
eliminate old algorithm for deviant art sources, fix canonical_url on deviantart
2019-04-12 16:35:41 -07:00
Albert Yi
f6a11e6363
remove residual code
2019-02-25 14:46:43 -08:00
Albert Yi
90ce42a537
add support for nico seiga manga ( fixes #4060 )
2019-02-25 14:44:45 -08:00
Albert Yi
d8aabff77b
remove post keeper references
2019-01-31 15:45:06 -08:00