diff --git a/antiabuse/antispam/urldetector/__init__.py b/antiabuse/antispam/urldetector/__init__.py index 6cffb96..4bef18a 100644 --- a/antiabuse/antispam/urldetector/__init__.py +++ b/antiabuse/antispam/urldetector/__init__.py @@ -46,6 +46,8 @@ 'discordapp.com', 'instagram.com', 'onlyfans.com', + 'paypal.com', + 'paypal.me', 'throne.com', 'twitch.tv', } diff --git a/antiabuse/normalize/__init__.py b/antiabuse/normalize/__init__.py index 25017f0..83e2e8c 100644 --- a/antiabuse/normalize/__init__.py +++ b/antiabuse/normalize/__init__.py @@ -29,6 +29,8 @@ "fvcked": "fucked", "fvck": "fuck", "fvcking": "fucking", + "h[@a4]rm": "harm", + "l0licon": "lolicon", "l0li": "loli", "ngger": "nigger", "nggr": "nigger", @@ -37,12 +39,16 @@ "p0rn": "porn", "p[e3]d[o0]": "pedo", "pissin": "pissing", - "r[a4]p[e3]-?able": "rapeable", - "r[a4]p[e3]": "rape", + "r[@a4]p[e3]-?able": "rapeable", + "r[@a4]p[e3]": "rape", "r": "are", + "raype": "rape", + "s[e3]lf": "self", "sxy": "sexy", - "un-?r[a4]p[e3]-?able": "unrapeable", - "un-?r[a4]p[e3]": "unrape", + "tr[@a4]nnies": "trannies", + "tr[@a4]nny": "tranny", + "un-?r[@a4]p[e3]-?able": "unrapeable", + "un-?r[@a4]p[e3]": "unrape", "urself": "yourself", "ur": "your", "u": "you", diff --git a/antiabuse/normalize/test_init.py b/antiabuse/normalize/test_init.py index 5a5d384..ab9944d 100644 --- a/antiabuse/normalize/test_init.py +++ b/antiabuse/normalize/test_init.py @@ -10,6 +10,8 @@ def test_normalize_string(self): self.assertEqual(normalize_string("r4p3"), "rape") + self.assertEqual(normalize_string("raype"), "rape") + self.assertEqual(normalize_string("a55"), "ass") self.assertEqual(normalize_string("𝖓𝖎𝖌𝖌𝖊𝖗"), "nigger") @@ -18,6 +20,12 @@ def test_normalize_string(self): self.assertEqual(normalize_string("unr4pe-able"), "unrapeable") + self.assertEqual(normalize_string("s3lf h4rm"), "self harm") + + self.assertEqual(normalize_string("tr@nnies"), "trannies") + + self.assertEqual(normalize_string("tr@nny"), "tranny") + if __name__ == '__main__': unittest.main() diff --git a/service/chat/__init__.py b/service/chat/__init__.py index be4ddf9..3e52316 100644 --- a/service/chat/__init__.py +++ b/service/chat/__init__.py @@ -36,7 +36,7 @@ class IntroRateLimit(Enum): NONE = 0 - UNVERIFIED = 20 + UNVERIFIED = 15 BASICS = 40 PHOTOS = 100 diff --git a/service/search/sql/__init__.py b/service/search/sql/__init__.py index ddfd273..10929b1 100644 --- a/service/search/sql/__init__.py +++ b/service/search/sql/__init__.py @@ -55,7 +55,6 @@ coordinates, personality, gender_id, - verification_level_id, COALESCE( ( SELECT @@ -531,21 +530,13 @@ 500 ), do_promote_verified AS ( SELECT - has_minimum_count.x - AND - searcher.verification_level_id > 1 AS x + count(*) >= 250 AS x FROM - searcher, - ( - SELECT - count(*) >= 250 AS x - FROM - prospects_fourth_pass - WHERE - profile_photo_uuid IS NOT NULL - AND - verified - ) AS has_minimum_count + prospects_fourth_pass + WHERE + profile_photo_uuid IS NOT NULL + AND + verified ) INSERT INTO search_cache ( searcher_person_id, @@ -706,8 +697,7 @@ Q_QUIZ_SEARCH = """ WITH searcher AS ( SELECT - personality, - verification_level_id + personality FROM person WHERE @@ -715,23 +705,15 @@ LIMIT 1 ), do_promote_verified AS ( SELECT - has_minimum_count.x - AND - searcher.verification_level_id > 1 AS x + count(*) >= 250 AS x FROM - searcher, - ( - SELECT - count(*) >= 250 AS x - FROM - search_cache - WHERE - searcher_person_id = %(searcher_person_id)s - AND - profile_photo_uuid IS NOT NULL - AND - verified - ) AS has_minimum_count + search_cache + WHERE + searcher_person_id = %(searcher_person_id)s + AND + profile_photo_uuid IS NOT NULL + AND + verified ), page AS ( SELECT prospect_person_id, diff --git a/test/functionality1/search.sh b/test/functionality1/search.sh index 26ca800..c6045fc 100755 --- a/test/functionality1/search.sh +++ b/test/functionality1/search.sh @@ -397,20 +397,6 @@ test_verified_promoted () { local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")') [[ "$response" = 'user2 extrauser1 extrauser2 extrauser4 extrauser5' ]] - - # If the searcher isn't verified, they don't necessarily see verified members - # first - q " - update - person - set - verification_level_id = 1 - where - name = 'searcher' - " - - local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")') - [[ "$response" = 'user1 user2 extrauser1 extrauser2 extrauser3' ]] } test_quiz_filters () { diff --git a/test/functionality4/xmpp-rate-limit.sh b/test/functionality4/xmpp-rate-limit.sh index 84b62c9..9d663b7 100755 --- a/test/functionality4/xmpp-rate-limit.sh +++ b/test/functionality4/xmpp-rate-limit.sh @@ -211,7 +211,7 @@ test_rate_limit () { } test_rate_limit \ - 20 \ + 15 \ 1 \ ''