Commit Graph

6749 Commits

Author SHA1 Message Date
evazion
5113aec937 artist finder: fix bogus matches for nijie. 2018-03-03 11:26:15 -06:00
Albert Yi
159d807026 Merge pull request #3568 from evazion/fix-3552
Fix #3552: Upload filesize limits can be bypassed
2018-02-28 10:44:50 -08:00
evazion
feaad0bbd0 nginx.conf: fix inconsistent client_max_body_size. 2018-02-27 18:22:37 -06:00
evazion
5ad06a4034 Fix #3552: Upload filesize limits can be bypassed.
* Change `http_get_streaming` to write the output file directly,
  instead of taking a callback.

* Track the filesize as the download progresses and abort when it
  exceeds the limit.

* Don't save the Content-Type (it's not used anywhere).
2018-02-27 18:22:34 -06:00
Albert Yi
77e7a6553c Merge pull request #3567 from evazion/fix-3518
Fix #3518: Don't prune mod actions.
2018-02-27 16:17:39 -08:00
evazion
9b89f0f54c Fix #3518: Don't prune mod actions. 2018-02-27 18:15:53 -06:00
Albert Yi
7d5ad1bcc4 Merge pull request #3563 from evazion/fix-3528
Fix #3528: Add method to prevent image-hosting CloudFlare sites from altering the image
2018-02-26 17:40:46 -08:00
Albert Yi
f6716f3df5 Merge pull request #3564 from evazion/fix-3554
Fix #3554: BUR approval bugs
2018-02-26 17:40:00 -08:00
Albert Yi
e6d96a7f28 Merge pull request #3562 from evazion/fix-3548
#3548: Upgrade to jquery-2.2.4
2018-02-26 15:43:52 -08:00
evazion
78aba1c5b1 Fix #3554: approving BUR with nil forum_post_id doesn't update forum.
Wrap `approve!` and `reject!` in transactions so that if there's an
error in approving or rejecting a BUR, it leaves the BUR's status
unchanged instead of updating the BUR but not updating the forum.
2018-02-24 15:04:57 -06:00
evazion
2b8767d7f4 BulkUpdateRequest#approve!: don't swallow exceptions.
Rescue `AliasAndImplicationImporter::Error` instead of `Exception`.
2018-02-24 14:37:02 -06:00
evazion
c9eee7e4d4 Fix #3528: Prevent CloudFlare from altering images. 2018-02-24 13:42:00 -06:00
evazion
b859a1f714 downloads: add tests for untested sites. 2018-02-24 13:42:00 -06:00
evazion
e48b75c261 downloads: rewrite url in download!, not http_get_streaming.
Refactor Downloads::File#http_get_streaming to just download the given
url, not rewrite it.

Don't clobber @source or @data in `#size` either.
2018-02-24 11:23:27 -06:00
evazion
7157251657 Upgrade to jquery-2.2.4 (#3548). 2018-02-24 10:43:12 -06:00
evazion
3fefb73e90 Fix #3561: Tumblr: support answer posts. 2018-02-24 10:31:59 -06:00
r888888888
916a57b2fd update deprecated jquery 2018-02-22 11:46:11 -08:00
r888888888
689b5690bf fixes #3560 2018-02-22 11:15:42 -08:00
Albert Yi
f38960092d Merge pull request #3559 from r888888888/revert-3551-fix-3528
Revert "Fix #3528: Add method to prevent image-hosting CloudFlare sites from altering the image"
2018-02-21 17:20:30 -08:00
Albert Yi
d8340f83db Revert "Fix #3528: Add method to prevent image-hosting CloudFlare sites from altering the image" 2018-02-21 17:20:13 -08:00
Albert Yi
18871b60ba Merge pull request #3551 from evazion/fix-3528
Fix #3528: Add method to prevent image-hosting CloudFlare sites from altering the image
2018-02-21 14:52:43 -08:00
Albert Yi
1938319504 Merge pull request #3555 from evazion/fix-3554
#3554: Allow admins to edit BUR forum topic/post ids
2018-02-21 14:52:11 -08:00
Albert Yi
ceecc62aa8 Merge pull request #3557 from evazion/fix-autocomplete-consistency
Fix inconsistencies in autocomplete behavior
2018-02-21 14:51:50 -08:00
evazion
c482175050 Fix #3558: Autocomplete: negated metatags aren't completed.
Fix Danbooru.Autocomplete.parse_query to strip prefixes off of
metatags.
2018-02-19 23:57:46 -06:00
evazion
d8e195d168 autocomplete: unify autocomplete options.
Use a single set of default options so that autocomplete behaves
the same way everywhere.
2018-02-18 19:22:46 -06:00
evazion
4754daf594 autocomplete: unify menu item rendering.
* Use `Danbooru.Autocomplete.render_item` for all menu item rendering.
  Fixes usernames not being colorized when completing mentions, and post
  counts not being shown when completing pools on the /pools page.

* Make the /pools page autocomplete pool names the same way that the
  pool:<name> metatag does. Previously autocomplete on the /pools page
  listed most recently updated pools first; now it lists largest pools first.
2018-02-18 19:22:46 -06:00
evazion
962842815d autocomplete: move artist/pool/wiki autocompletion to autocomplete.js.
* Move all autocomplete code to autocomplete.js.

* Mark autocompleted fields with `data-autocomplete="<type>"` attributes,
  instead of hardcoding input field IDs in the javascript.
2018-02-18 19:22:17 -06:00
evazion
a058a77c07 ApplicationHelper#search_field: accept html attributes on <input> field.
Rewrite `search_field` to allow setting `data-*` attributes on the <input> field.
2018-02-18 18:34:18 -06:00
evazion
4bc5cc8ccd bulk update requests: allow admins to edit forum topic/post ids (#3554). 2018-02-18 13:08:53 -06:00
evazion
f07aa1b170 bulk update requests: convert to strong params. 2018-02-18 12:12:12 -06:00
evazion
263fd0eef1 Fix #3528: Prevent CloudFlare from altering images. 2018-02-17 11:43:27 -06:00
evazion
1eff41a6f9 downloads: rewrite url in download!, not http_get_streaming.
Refactor Downloads::File#http_get_streaming to just download the given
url, not rewrite it.

Don't clobber @source or @data in `#size` either.
2018-02-17 11:11:50 -06:00
Albert Yi
9204cd825e Merge pull request #3550 from evazion/fix-3548
#3548: Upgrade to jquery-1.12.4
2018-02-15 20:21:04 -08:00
evazion
9aa0af82ba Upgrade to jquery-1.12.4; add jquery-migrate plugin (#3548). 2018-02-15 21:38:16 -06:00
Albert Yi
26b260f1c8 Merge pull request #3549 from evazion/fix-autocomplete-autofocus
Autocomplete: Fix issues with Enter key
2018-02-15 11:19:32 -08:00
evazion
0e259bd4f6 autocomplete: fix issues with Enter key.
* Disable autoFocus. This means that the first item in the autocomplete
  menu isn't automatically selected.

* Add Tab keybinding, to make the Tab key work as normal with autoFocus disabled.

* Fix the Enter key to 1) insert the selected tag when inside the
  autocomplete menu, and 2) submit the search as normal when not inside
  the autocomplete menu.
2018-02-14 22:09:14 -06:00
evazion
b877c037b2 autocomplete: factor out insert_completion function. 2018-02-14 20:23:37 -06:00
Albert Yi
8d3e3dd523 Merge pull request #3546 from evazion/fix-3545
Fix #3545: Autocomplete: enter key should submit on exact match
2018-02-13 10:30:04 -08:00
evazion
f0754c21f5 autocomplete: make enter key submit on exact match. 2018-02-13 10:52:43 -06:00
evazion
ab86c2049f autocomplete: factor out parse_query function. 2018-02-13 10:36:20 -06:00
Albert Yi
4e10913e31 Merge pull request #3544 from BrokenEagle/fix-autocomplete-nosource
Clear results when a non-autocomplete metatag is used
2018-02-13 00:30:31 -08:00
BrokenEagle
30401591fb Set blank results when a non-autocomplete metatag is used
-Otherwise, the last valid autocomplete result will remain
--Causes incorrect results on Tab/Enter completion
-This clears the autocomplete results instead
2018-02-12 17:20:12 -08:00
evazion
e8ab5cdc4c Fix pool version ordering.
Pool version IDs aren't in the right order; order by updated_at instead.
2018-02-08 16:53:02 -06:00
Albert Yi
27f2b9d365 Merge pull request #3540 from r888888888/revert-3529-most-valued
Revert "implement post keepers"
2018-02-07 12:29:06 -08:00
Albert Yi
b9fcfe0442 Revert "implement post keepers" 2018-02-07 12:28:56 -08:00
Albert Yi
2e62916832 Merge pull request #3529 from r888888888/most-valued
implement post keepers
2018-02-07 12:10:38 -08:00
Albert Yi
a6a2c7a3a1 Merge pull request #3538 from evazion/fix-3532
Fix #3532: Make Enter key accept current tag during autocomplete.
2018-02-07 12:10:24 -08:00
evazion
cf27de2ec9 Fix #3532: Make Enter key accept current tag during autocomplete.
Previously we patched the jqueryui-autocomplete library in order to
customize how the Tab and Enter keys behaved. Specifically, we wanted to
prevent the Tab key from moving the focus out of the tag input box, and
we wanted to prevent the Enter key from submitting the page when editing tags.

These things can achieved without patching the library by using
`event.preventDefault` and `event.stopImmediatePropagation` to prevent
other event handlers from running after these keys trigger the
`autocompleteselect` event.
2018-02-06 19:11:01 -06:00
Albert Yi
b03c8084a5 Merge pull request #3536 from BrokenEagle/fix-resize-with-user-setting
Fix the auto resize in desktop mode (ref: a95af95e)
2018-02-05 15:11:26 -08:00
r888888888
ba6e3f4a0e gracefully handle bad connection errors to replica db ref #3212 2018-02-05 15:05:21 -08:00