Commit Graph

994 Commits

Author SHA1 Message Date
evazion
c9acbbdf9e uploads: revamp /uploads listing UI (#3657).
* Add thumbnails.
* Colorize tags.
* Rearrange columns.
* Add rating/source/size/dimensions info.
* Add "»" search drilldown links.
2018-04-20 15:52:09 -05:00
evazion
8083c7daae uploads: fix batch upload page to work without bookmarklet.
* Add a form to the /uploads/batch page so that it can be used without
  the bookmarklet.

* Fix an exception when no url is given.
2018-04-20 15:51:56 -05:00
evazion
83b96b4f3f Fix #3652: URL addons stripped when comments are created/edited. 2018-04-18 23:58:35 -05:00
evazion
9b6136fb55 Fix missing parameter exception in /user_feedbacks/new.
ref: https://danbooru.donmai.us/forum_topics/9127?page=233#forum_post_145227
2018-04-17 10:23:55 -05:00
evazion
bca483cefd Fix #3628: Retry button is displayed for failed uploads that cannot succeed even if retried 2018-04-12 22:14:06 -05:00
evazion
af02113e3c /wiki_pages/new: fix "param is missing or the value is empty: wiki_page" 2018-04-12 21:31:34 -05:00
Albert Yi
19cc8ebf9e fixes #3630 2018-04-12 16:02:41 -07:00
Albert Yi
5546d9e98b fixes #3627 2018-04-12 14:20:02 -07:00
Albert Yi
9975b2dd35 don't require saved_search params when creating a new saved search 2018-04-12 13:56:02 -07:00
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
Albert Yi
23fef71346 Merge pull request #3609 from evazion/fix-3603
Fix #3603: Unable to view images on Hijiribe/Sonohara when Danbooru is blocked
2018-04-09 10:56:00 -07:00
evazion
d8142a6c21 iqdb_queries_controller.rb: simplify show / check actions.
* Combine create_by_post + create_by_url. Rename to find_similar.
* Move iqdb enabled check to find_similar.
2018-04-07 18:03:01 -05:00
evazion
1b14545d0d Fix #3603: Unable to view images on Hijiribe/Sonohara when Danbooru domain is blocked. 2018-04-06 21:25:14 -05: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
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
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
8a012d4c91 Remove unused mobile mode code (#3206).
Mobile mode was removed in 31e36cf.
2018-03-20 02:29:06 -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
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
84a0a89f4b Fix #3539: Open redirect vulnerabilities. 2018-02-07 19:52:52 -06:00
r888888888
308e3670df gracefully handle unavailable pg connection errors 2018-02-05 12:38:01 -08:00
evazion
f2a7d3c41a /janitor_trials, /ip_bans: fix default ordering. 2018-02-04 16:48:35 -06:00
r888888888
e0ec9ed518 fix ordering of forum posts in topics 2018-02-01 16:35:47 -08:00
evazion
d4298ea493 Fix #3527: Bookmarklet timeouts for Members. 2018-02-01 17:35:20 -06:00
BrokenEagle
d829ab3a00 Move all order logic to models
- Have a default order for each model
-- The overall default is ID DESC
- Allow for custom orderings
-- When comma-separated IDs are used
2018-01-29 11:42:53 -08:00
Albert Yi
dfd343f70e Merge pull request #3496 from BrokenEagle/feat-mod-action-event-ids
Add categories to mod actions
2018-01-15 11:09:38 -08:00
evazion
7a0fb0f5d3 Fix #3500: Redirect API endpoints with md5 query param to correct format. 2018-01-14 20:36:57 -06:00
BrokenEagle
85f04a826a Added additional mod actions 2018-01-14 00:07:20 -08:00
Albert Yi
99c0c4ade6 Merge pull request #3479 from BrokenEagle/feat-add-iqdb-page
Initial add of IQDB standalone page
2018-01-02 10:29:27 -08:00
BrokenEagle
36ef8b4db3 Initial add of IQDB standalone page 2017-12-30 00:11:08 -08:00
evazion
857fa24697 Fix #3473: Validation warnings for no artist/copyright are still shown on upload failure. 2017-12-28 18:19:28 -06:00
evazion
1fc2284874 /users/new: show error message when account signup fails. 2017-12-27 13:34:20 -06:00
Albert Yi
010e70e6c7 Merge pull request #3454 from evazion/fix-3448
Fix #3448: Lower the limit for tag category changes
2017-12-25 13:20:45 -08:00
evazion
19bda2056c tags: update category cache whenever category changes.
Do `update_category_cache_for_all` in a callback instead of calling it
manually everywhere.
2017-12-23 13:07:23 -06:00
evazion
5975152ddc Fix double render error in /blah.js. 2017-12-23 00:45:07 -06:00
Albert Yi
a1985a9ca2 Merge pull request #3435 from evazion/fix-3324
Fix #3324: Incorporate replacement comment info in the replacement history
2017-12-19 15:02:06 -08:00
evazion
fa941e9480 /post_replacements: allow updating image metadata in past replacements. 2017-12-18 18:03:03 -06:00
Albert Yi
f5cb49d9bf Merge pull request #3433 from BrokenEagle/fix-fav-privacy
Fix incorrect showing of favorites and favorite groups with privacy settings enabled
2017-12-18 14:58:54 -08:00
BrokenEagle
3b1fdc8cde Fixed incorrect showing of favorite groups 2017-12-18 12:17:18 -08:00
r888888888
a95af95eae move desktop mode to user pref 2017-12-15 13:52:25 -08:00
Albert Yi
c3f1c786e8 Merge branch 'master' into fix-recaptcha 2017-12-13 14:33:39 -08:00
evazion
8d8a2f9c1e Make recaptcha optional on signup page. 2017-11-29 18:09:37 -06:00
evazion
07a4bdcb21 posts: display validation warnings in flash notice. 2017-11-25 17:03:32 -06:00
Albert Yi
a72f367ad7 Merge pull request #3394 from BrokenEagle/fix-deleted-pools-editable
Add additional restrictions on updating deleted pools
2017-11-21 10:48:50 -08:00
BrokenEagle
956bd707a5 Add additional restrictions on updating deleted pools 2017-11-20 19:31:11 -08:00
r888888888
c0ddf266fc move save search button to sidebar 2017-11-17 16:51:38 -08:00
r888888888
9a3824a87e fixes #3382 2017-11-17 16:18:59 -08:00
r888888888
31e36cf9eb remove unused mobile layouts 2017-11-17 13:59:14 -08:00
r888888888
e70c2a3085 remove references to tag subscriptions 2017-11-17 13:45:17 -08:00