Commit Graph

1678 Commits

Author SHA1 Message Date
r888888888
f374eec4a1 fixes #2869: Add way to differentiate Pool Descriptions from Pool History 2017-02-14 16:03:19 -08:00
evazion
c926f75918 fixup! post.rb: validate newly added tags. 2017-02-09 02:14:48 -06:00
evazion
facf819620 post.rb: validate newly added tags.
Existing tags with invalid names are still permitted. This is to allow
for a gradual transition to good tag names.
2017-02-08 23:31:30 -06:00
evazion
347f11b935 post.rb: group validation methods together. 2017-02-08 23:31:30 -06:00
evazion
8e3296f3ea tag.rb: don't strip '%' or ',' from tags; split on unicode spaces.
Allows '%' and ',' in tag names. There's no technical need to forbid
these characters.

Fixes an issue with these characters being stripped away inside metatags
(e.g. tagging a post with `pool:ichigo_100%` strips away the '%').
2017-02-08 23:31:30 -06:00
evazion
853ddc7cda tag.rb: validate tag names.
Makes these tag names invalid when tagging posts:

* Blank names (e.g. ___).
* Non-ASCII characters (Japanese text).
* Non-printable characters (e.g. control characters < 0x20).
* Leading or trailing underscores, or consecutive underscores. Reason:
  `_foo__bar_` and `foo_bar` both render as `foo bar` in the tag list.
* Leading `-` or `~`, or '*' (-foo, ~foo, foo*bar). Previously
  these were silently stripped, but that meant tagging a post with e.g.
  `*-foo` tagged the post with the invalid tag `-foo`.
* Tag type prefixes (e.g. `character:character:hatsune_miku` no longer creates
  the literal tag `character:hatsune_miku`).
* Metatags (order:score, user:evazion, etc).
2017-02-08 23:30:23 -06:00
r888888888
f0a8598ba2 update aws gem, stub in rake tasks for s3 2017-02-08 15:06:54 -08:00
r888888888
b57b54113f add cdn hosted flag to posts 2017-02-07 17:26:16 -08:00
Albert Yi
1c837aba6e Merge pull request #2879 from evazion/fix-dead-code
Eliminate dead code
2017-02-07 13:56:05 -08:00
Albert Yi
b1c33f2379 Merge pull request #2878 from evazion/fix-test-coverage
Improve controller test coverage
2017-02-07 13:45:16 -08:00
evazion
b5bf9b8678 post.rb: remove assorted unused methods. 2017-02-06 19:07:03 -06:00
evazion
74b8ebe580 tag.rb: remove unused find_suggestions, increment_view_count.
find_suggestions unused since ca3e9bb.
2017-02-06 19:07:03 -06:00
evazion
ec653dce71 app/presenters: remove unused forum_post/note/post_version presenters. 2017-02-06 19:07:02 -06:00
evazion
35b3398142 post_test.rb: add more metatag search tests. 2017-02-06 18:48:39 -06:00
evazion
64b4004bbf tests: add favorite groups controller tests. 2017-02-06 18:48:35 -06:00
r888888888
2e69cd619e resize medium + small artstation urls also 2017-02-06 15:22:06 -08:00
Albert Yi
4357c6e718 Merge pull request #2874 from evazion/fix-tests
Fix various failing tests
2017-02-03 14:28:42 -08:00
r888888888
497011289f fixes #2865: Undeleting a post doesn't resolve flags 2017-02-03 14:22:21 -08:00
evazion
a327854017 Fix post_update_count increment test.
7) Failure:
PostTest#test_: Tagging: A post that has been updated should increment the updater's post_update_count. [/home/danbooru/src/danbooru/test/unit/post_test.rb:1010]:
"CurrentUser.post_update_count" didn't change by 1.
Expected: 1
  Actual: 3
2017-02-03 04:04:02 -06:00
evazion
e98e7f1ea7 Fix note_update_count increment test.
5) Failure:
NoteTest#test_: In all cases updating a note should increment the updater's note_update_count. [/home/danbooru/src/danbooru/test/unit/note_test.rb:113]:
"CurrentUser.note_update_count" didn't change by 1.
Expected: 1
  Actual: 0
2017-02-03 04:03:44 -06:00
Albert Yi
7a05af657a Merge pull request #2871 from evazion/feat-filetype-metatag
Add filetype: metatag.
2017-02-02 11:44:33 -08:00
evazion
50b793d129 Don't send failed uploads to IQDB (possible fix for #2867). 2017-02-02 01:26:59 -06:00
evazion
558e4e5443 Add filetype: metatag. 2017-02-02 00:53:56 -06:00
r888888888
cee6a8331a bug fix for janitor trial mailer 2017-02-01 10:49:59 -08:00
Type-kun
8848fa2e2f Fixes #2861 2017-01-27 20:08:43 +05:00
Type-kun
1d25d1315a Fix comment search bugs (secondary ordering, non-bumping typo) 2017-01-27 14:12:16 +05:00
r888888888
8a93fdf18f additional saved search fixes 2017-01-25 12:48:47 -08:00
r888888888
98b305b4db add link to mod+ topics 2017-01-24 13:13:13 -08:00
Albert Yi
d7662c1f2b Merge pull request #2857 from evazion/feat-dotenv
Add dotenv support
2017-01-24 12:02:33 -08:00
evazion
caaff24112 /comments?group_by=comment: add is_sticky/is_deleted/do_not_bump_post/order params. 2017-01-23 22:13:00 -06:00
evazion
74bbd45cdf dotenv: enable overriding database settings. 2017-01-23 18:07:52 -06:00
r888888888
c7b5a4e229 add references to user statistics page about saved searches 2017-01-23 10:56:39 -08:00
r888888888
e80096bf19 fixes #2850: NoMethodError exception when sending DMail 2017-01-20 12:37:43 -08:00
Albert Yi
fa94eafef3 Merge pull request #2852 from evazion/fix-deleted-name-changes
Fix #2851: Account deletion should remove name change requests.
2017-01-20 11:35:54 -08:00
evazion
afb8eeea30 Fix exploit making user name change reasons being public in API. 2017-01-19 23:41:36 +00:00
evazion
7486bb0add Fix #2851: Account deletion should remove name change requests.
Hides name change requests for deleted users (username matches /user_[0-9]+~*/).
2017-01-19 22:32:13 +00:00
Type-kun
75c13cc953 Possible fix for issue #2849 2017-01-19 14:51:53 +05:00
r888888888
bfa56a860c fixes #2415: "Random post" causes RecordNotFound exceptions 2017-01-18 14:12:12 -08:00
r888888888
237c997ae1 remove usage of increment! #2835 2017-01-17 15:46:21 -08:00
Albert Yi
ae442c3391 fixes #2760: unable to register an account with a blank email 2017-01-16 14:56:08 -08:00
Albert Yi
a49394e6cd Merge pull request #2842 from evazion/fix-user-name-changes
Minor user name changes improvements.
2017-01-16 11:50:51 -08:00
Type-kun
5ce26c2e52 Remaining fixes to mod actions on user feedbacks and IP bans 2017-01-16 18:21:09 +05:00
evazion
f57f352838 Name changes: format processed requests more nicely. 2017-01-15 04:22:00 +00:00
Type-kun
02c243b968 Revert to: "Another partial fix for issue #2824, which also affected ip bans and feedback" 2017-01-14 21:53:33 +00:00
Type-kun
922276da6b Fixed typo in forum post mod action 2017-01-14 15:52:43 +05:00
Albert Yi
63d5c7900d enable bulk reverts, fixes to postarchive 2017-01-11 16:20:04 -08:00
Albert Yi
962f5b3dae fix typo 2017-01-11 14:43:36 -08:00
Albert Yi
0ab45ebc42 add postarchive model, fixes #2831: Replace Subscriptions Link With Search:All Link 2017-01-11 11:39:14 -08:00
evazion
1f325c19da Show previous usernames to members; link to actual change requests. 2017-01-11 13:07:39 -06:00
Albert Yi
1efe47f2f9 fix bug to token_count increment 2017-01-09 17:37:46 -08:00