Commit Graph

6790 Commits

Author SHA1 Message Date
Albert Yi
23cb58c4e3 Merge pull request #3592 from evazion/fix-3583
Fix #3583: Copying notes should also change meta tags in the destination post
2018-04-02 10:25:15 -07:00
evazion
c19a1b83a9 Fix #3573: commentary: add source citation when fetching cross-site. 2018-03-31 17:20:20 -05:00
evazion
f15f2cbb81 Fix #3581: Mod Dashboard: exclude or mark deleted comments. 2018-03-31 13:14:41 -05:00
evazion
8fd9d374ca Fix #3583: Copying notes should copy tags to destination. 2018-03-31 12:58:56 -05:00
evazion
8e7ad9eb97 Post#copy_notes_to: wrap in transaction. 2018-03-31 11:44:49 -05:00
evazion
04ecca6a06 Fix #3591: DeviantArt commentaries: strip embedded image/text thumbs. 2018-03-31 11:27:14 -05:00
evazion
75cc1421a3 Fix #3590: Superfluous space added on certain autocompletions.
Bug: searching for /wiki_pages?search[title]=touhou%20 didn't find the
'touhou' wiki. The space wasn't stripped when the title was normalized.
2018-03-30 22:24:34 -05:00
evazion
80219a0ccf commentaries: replace <img> tags with dtext links (#3586)
Replace <img> tags with dtext links, unless the <img> tag is already
inside an <a> tag.

Also strip Unicode spaces from DeviantArt commentaries.
2018-03-30 21:42:51 -05:00
evazion
b185efbb5f tumblr commentaries: include asker's name in ask posts (#3586). 2018-03-30 21:42:51 -05:00
evazion
74d46708c7 INSTALL.debian: bump ruby version to 2.5.1 (4ff5af626). 2018-03-30 18:58:18 -05:00
Albert Yi
e4c30811b6 Merge pull request #3588 from evazion/fix-3570
Add limits on max dimensions of uploads
2018-03-29 20:20:42 -07:00
Albert Yi
6bb814678e Merge pull request #3589 from evazion/fix-libvips-84
Workaround for libvips-8.4 incompatibility
2018-03-29 20:20:07 -07:00
evazion
fd055a894b DanbooruImageResizer: workaround libvips-8.4 incompatibility. 2018-03-29 21:41:22 -05:00
evazion
c0c41dd369 uploads: add limits on max image dimensions. 2018-03-29 19:24:41 -05:00
Albert Yi
4ff5af626f upgrade to ruby 2.5.1 2018-03-29 09:56:35 -07:00
Albert Yi
fa9442209e fix typo in storagemanager/s3 2018-03-28 17:23:07 -07:00
Albert Yi
18dd47c557 Merge branch 'master' of github.com:r888888888/danbooru 2018-03-28 17:19:35 -07:00
Albert Yi
929b2fa896 move default base url to method to deal with deployment issues 2018-03-28 17:19:21 -07:00
evazion
be0c2cfcfa posts: fix incorrect large_file_url for animated_gifs.
For animated_gif posts, large_file_url was returning
"/data/sample-$md5.jpg" instead of "/data/$md5.gif".
2018-03-28 19:17:15 -05:00
Albert Yi
8bdb7e982d Merge pull request #3584 from evazion/feat-libvips
Fix #3582: Switch from ImageMagick to libvips
2018-03-28 16:34:18 -07:00
evazion
dc9b7e5bda Fix #3582: Switch from ImageMagick to libvips 2018-03-28 17:15:57 -05:00
Albert Yi
6c790c61d3 replace uploader information post previews and comment listing, rename tagger to top tagger 2018-03-27 10:49:41 -07:00
Albert Yi
ce7e31325c Merge pull request #3577 from evazion/feat-storage-manager
Introduce storage manager concept
2018-03-27 09:28:17 -07:00
evazion
619a2055fe tests: add storage manager tests. 2018-03-20 19:49:58 -05:00
evazion
d089be9f8a tests: fix upload tests. 2018-03-20 19:49:58 -05:00
evazion
41a4ff15cd posts: remove unused file path / url methods.
* Remove file_path_for, cropped_file_url (dead code)
* Remove complete_preview_file_url (preview_file_url now returns absolute links)
* Remove `file_name` (only used for Download link in sidebar)
2018-03-20 19:49:55 -05:00
evazion
b7f7187f63 posts: use storage manager to delete files. 2018-03-20 19:49:06 -05:00
evazion
f0bf1bc66e posts: use storage manager to backup files.
* Perform backups synchronously inside `distribute_files` instead of
  asynchronously in `queue_backup`. Asynchronous backups assumed that
  files are stored on the local filesystem, which isn't true in general.

* Remove obsolete backup service classes.
2018-03-20 19:49:06 -05:00
evazion
6d0d1a3ce9 posts: use storage manager to build file urls. 2018-03-20 19:49:06 -05:00
evazion
c76463f34d uploads: use storage manager to distribute files.
Refactors the upload process to pass around temp files, rather than
passing around file paths and directly writing output to the local
filesystem. This way we can pass the storage manager the preview /
sample / original temp files, so it can deal with storage itself.

* Change Download::File#download! to return a temp file.

* Change DanbooruImageResizer and PixivUgoiraConverter to accept/return
  temp files instead of file paths.

* Change Upload#generate_resizes to return temp files for previews and samples.

* Change Upload#generate_resizes to generate ugoira .webm samples
  synchronously instead of asynchronously.
2018-03-20 19:49:06 -05:00
evazion
60dcfbfbdd uploads: autotag animated_gif/png during upload.
Move animated_gif / animated_png autotagging to take place during
uploading, instead of during tag editing. We can't generally assume the
file will be present on the local filesystem after uploading.
2018-03-20 19:49:06 -05:00
evazion
2286ccfca8 uploads: clean up process_upload.
* Remove `initialize_status` (status already defaults to pending in database)
* Remove `has_dimensions?` (always returns true)
* Remove `async_conversion?` (dead code)
* Remove `validate_file_exists` (unneeded checks)
* Simplify `calculate_dimensions`
* Merge `file_header_to_content_type` with `content_type_to_file_ext` (content type isn't used elsewhere)
2018-03-20 19:49:06 -05:00
evazion
b0c7d9c185 Add storage managers (local, sftp, s3, hybrid). 2018-03-20 19:49:06 -05:00
evazion
8a012d4c91 Remove unused mobile mode code (#3206).
Mobile mode was removed in 31e36cf.
2018-03-20 02:29:06 -05:00
evazion
44c604521e Fix #3572: Install script installs wrong ruby version. 2018-03-20 02:21:43 -05:00
Albert Yi
448ec81e97 Merge pull request #3541 from evazion/fix-3539
Fix #3539: Open redirect vulnerabilities
2018-03-08 16:02:02 -08:00
Albert Yi
418b2beae5 Merge pull request #3566 from r888888888/most-valued
Post taggers
2018-03-08 16:01:40 -08: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
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