Commit Graph

10519 Commits

Author SHA1 Message Date
evazion
f198a52f9e nokogiri: use bundled libxml2.
Make nokogiri use the bundled version of libxml2 instead of the system
version. In the past installing nokogiri was slow because it had to
compile the bundled version of libxml2, which is partly why we switched
to the system library. Now it's faster because the bundled version comes
pre-compiled with the nokogiri gem.

https://nokogiri.org/#native-gems-faster-more-reliable-installation

Reverts 440bbbb28.
2021-09-02 01:58:11 -05:00
evazion
19c0027d1f hentai foundry: fix 'Document tree depth exceeded' when parsing commentaries.
Fix a regression in 38c9559fe that caused #4657 to fail again.
2021-09-01 01:40:01 -05:00
evazion
d00aa847ae search: allow mods to search disapproved:<user> for other users.
Allow moderators to search `disapproved:<username>` with any user.
Before mods could only search for their own disapprovals, even though
they could see disapprovals by others.
2021-09-01 01:39:14 -05:00
evazion
c41e3f4590 saved searches: fix exploit allowing flaggers to be determined.
Fix an exploit that let you determine the flagger of a post using
`flagger:<username>` saved searches. Saved searches were performed as
DanbooruBot, but since DanbooruBot is a moderator, it let unprivileged
users do `flagger:<username>` searches. Saved searches were done as a
moderator to avoid tag limits, but this is no longer necessary since the
last PostQueryBuilder refactor.

fred get out
2021-09-01 00:55:19 -05:00
evazion
88e379f9cc Update DText gem. 2021-08-31 21:48:53 -05:00
evazion
374298a743 Fix #4853: Users should not be able to search by disapprover 2021-08-31 21:11:07 -05:00
evazion
38c9559fe8 nokogiri: switch to the nokogumbo-based html5 parser.
https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md#1120--2021-08-02
2021-08-30 21:21:27 -05:00
evazion
49d18e64e8 Fix #4869: "Random" button raises exception when viewing ordfav.
Fix exception during https://danbooru.donmai.us/posts/random?tags=ordfav:nonamethanks

Before we were doing a query like this:

    SELECT
      "posts".*
    FROM
      "posts"
    INNER JOIN
      "favorites" ON "favorites"."post_id" = "posts"."id"
    WHERE
      (favorites.user_id % 100 = 64 AND favorites.user_id = 52664)
      AND "posts"."id" = 343894
    ORDER BY
      favorites.id DESC,
      posts.id DESC,
      ID=343894 DESC

but `ID=? DESC` is ambiguous during an ordfav: search because of the
join on the favorites table. The fix is to qualify the reference as
`posts.id`.
2021-08-30 16:46:03 -05:00
evazion
1e5c7d6f0f Fix #4867: random=true in api only returns one post.
Pundit 2.1.1 changed it so that if the first argument to `authorize` is
an Array, then the `authorize` call returns the last element of the
array. This broke order:random, because in that case we returned an
Array of posts. The fix is to return an ActiveRecord::Relation of posts,
which is more correct anyway.
2021-08-29 22:37:16 -05:00
evazion
46c1b2c37d Fix #4868: undefined method `to_string' errors in /user_events search
Fix a regression introduced in rails/rails@4b1122c with the upgrade to Rails
6.1.4.1.

Triggered by a call to `SELECT * FROM ip_geolocations WHERE ip_addr in ...`.
A Rails refactoring changed the way that `WHERE ... IN ...` statements
worked, which had the side effect of passing a string value to our
IpAddressType serializer where before we expected a Danbooru::IpAddress
object.
2021-08-29 17:46:04 -05:00
evazion
d7cc844bd9 rake: add task for reindexing posts in iqdb. 2021-08-29 03:36:16 -05:00
evazion
34861678cb Fix #4661: Change shortcut for submitting uploads from Enter to Ctrl+Enter
Also fix #4734.
2021-08-28 04:53:33 -05:00
evazion
38edbb0512 Update Yarn packages. 2021-08-28 04:53:33 -05:00
evazion
3348e1000c Update Ruby gems. 2021-08-28 04:53:33 -05:00
evazion
a3587c30b2 Fix broken tests. 2021-08-28 04:53:33 -05:00
evazion
bb7f24d279 Add HTTP proxy support.
Add support for using a proxy for HTTP requests. Only used for external
requests, such as downloading files or talking to source sites such as
Pixiv or Twitter, not for internal requests, such as talking to IQDB or
Reportbooru.
2021-08-28 04:53:33 -05:00
evazion
349bf14764 Merge pull request #4864 from nottalulah/patch-1
Fix ugoira regenerations
2021-08-28 02:04:52 -05:00
evazion
1f02e1b0e7 Merge pull request #4865 from nonamethanks/fix-url-form-length
Fix url fields in forms not having the same length as other text inputs
2021-08-28 02:04:39 -05:00
nonamethanks
08234c496d Fix url fields in forms not having the same length as other text inputs 2021-08-26 13:32:16 +02:00
Lily
54ce73145d Fix ugoira regenerations
Currently ugoira with broken samples can't be regenerated, since the PixivUgoiraFrameData object is passed rather than the actual data itself (.data).
2021-08-24 20:27:40 -03:00
evazion
ec0fce34b7 Fix #4863: Retire deletion appeal thread. 2021-08-21 23:48:20 -05:00
evazion
c8d7f94d7e Update Ruffle version. 2021-08-21 04:01:24 -05:00
evazion
826736caaf replacements: fix updater in replacement comments.
Fix the "<User> replaced this post with a new file" comment saying the
comment was edited by the replacer.
2021-08-21 03:49:06 -05:00
evazion
38ca30d6fc Merge pull request #4862 from GlassedSilver/patch-1
Reflect that SQS is not needed anymore for IQDB
2021-08-21 02:44:31 -05:00
GlassedSilver
09eeb60337 Reflect that SQS is not needed anymore for IQDB
As discussed here: https://github.com/danbooru/danbooru/issues/4198
2021-08-19 05:16:49 +02:00
evazion
b4dc7487ee BURs: reduce autorejection timeout from 60 days to 45 days. 2021-08-15 04:51:48 -05:00
evazion
8f24e789b6 newrelic: fix crash during bootup caused by Rails.logger.
Using `Rails.logger` here causes server boot to fail with a `Undefined
method 'tagged'` error, possibly because `Rails.logger` isn't ready yet
during early initialization.
2021-08-15 02:16:57 -05:00
nonamethanks
0ddac45160 Mass updates: make the destination search clickable 2021-08-15 02:16:57 -05:00
nonamethanks
f60fce614b Fix lofter strategy due to changes in their image urls 2021-08-15 02:16:57 -05:00
Seedgou
35c9eff5bc fix ruffle-mirror version 2021-08-15 02:16:57 -05:00
nonamethanks
2a13667422 Tag nuke: remove implications to a tag before nuking it 2021-08-15 02:16:57 -05:00
nonamethanks
539af4421d IQDB direct url lookup: send the thumbnail instead of the full size 2021-08-15 02:16:57 -05:00
nonamethanks
d469b87ae2 Fix link to rest of user's post disapprovals 2021-08-15 02:16:57 -05:00
nonamethanks
bb4bdefc23 Lofter: add support for another theme 2021-08-15 02:16:56 -05:00
nonamethanks
716b9a5b88 Add utility links to user events from user page 2021-08-15 02:16:56 -05:00
nonamethanks
dddf21df92 Fix broken link to howto:pools in /pools/new 2021-08-15 02:16:56 -05:00
nonamethanks
b4b80b9618 Forum link search: also include BURs 2021-08-15 02:16:56 -05:00
nonamethanks
606b311841 Fix skeb strategy 2021-08-15 02:16:56 -05:00
nonamethanks
3f4174a917 Favgroups: only add shortcuts for first 10 groups 2021-08-15 02:16:56 -05:00
nonamethanks
bea03b7dc6 Upload page: show artist tag if it exists even if artist_name is empty in source 2021-08-15 02:16:56 -05:00
nonamethanks
e9d845e7cc Update site map 2021-08-15 02:16:56 -05:00
evazion
d2f6763a42 Merge pull request #4833 from nottalulah/master
make appeals editable
2021-07-10 02:26:36 -05:00
Lily
8d49d35ab1 make appeals editable 2021-06-29 14:43:27 -03:00
evazion
4b6e706e5e Fix #4603: Total Upload Limit Being Reduced After A Failed Appeal 2021-06-28 06:04:14 -05:00
evazion
000653d840 Parse and log user agent type to NewRelic.
Parse the user agent and log whether it seems like a known bot or a
human to NewRelic under the `user.bot` request attribute. This is so
that known bots can be filtered out of search traffic analytics. Bots
and search crawlers make up a significant portion of search traffic.
2021-06-28 05:09:34 -05:00
evazion
ad4c75eb1a docs add more docs to app/{jobs,logical}.
These were missed in the last commit.
2021-06-28 05:09:19 -05:00
evazion
fef5f238a5 Fix #4829: DanbooruBot not properly handling BUR aliases when target tag has a wiki. 2021-06-27 17:56:10 -05:00
evazion
10ddbae07b posts: change video_with_sound tag to sound.
The `video_with_sound` tag was aliased to `sound`. Fix the autotagger
and the thumbnail icon.

https://danbooru.donmai.us/forum_topics/18818
2021-06-27 05:21:38 -05:00
evazion
0563ca3001 docs: document config/ and some directories in app/.
* Add README files to several directories in app/ giving a brief
  overview of some parts of Danbooru's architecture.
* Add documentation for files in config/.
2021-06-27 05:21:38 -05:00
Thayol
b9068b8a3e Fix #4435: Search: wildcards with no matches should return no results 2021-06-24 04:04:13 -05:00