Aevann1
a6b7fed2fc
minor logic change in /@username
2022-07-03 14:12:33 +02:00
Aevann1
8917427323
fix snytax error
2022-07-03 13:59:39 +02:00
Aevann1
ed86ec1c14
more query optimization v3
2022-07-03 13:56:40 +02:00
Aevann1
3e87b20ed0
more query optiimzation v2
2022-07-03 13:30:54 +02:00
Aevann1
72884713ac
more quert optimization
2022-07-03 13:21:58 +02:00
Aevann1
6c8bcc0bda
fix long emojis
2022-07-03 10:00:42 +02:00
Aevann1
1f0f0ef0be
messing with joins
2022-07-03 08:12:53 +02:00
Aevann1
c8b4838157
unmessing with queries
2022-07-03 06:34:29 +02:00
Aevann1
91951ed142
messing with relationships
2022-07-03 06:27:48 +02:00
Aevann1
076fad1108
fix 403 errors on unrelated text
2022-07-03 05:42:15 +02:00
Aevann1
e121523a42
fix accidential greentext in reddit mentions
2022-07-03 04:13:25 +02:00
Aevann1
3bfe9e984b
don't allow URLs with '\\' in them
2022-07-03 04:03:40 +02:00
Aevann1
587b864e0a
re-enable pins
2022-07-03 04:00:29 +02:00
Aevann1
bce4c13043
kitchen sink commit, all over the place
2022-07-02 12:44:05 +02:00
Aevann1
6ec0d25034
strip sanitized text
2022-07-02 12:12:52 +02:00
Aevann1
b6ca73a0c5
testing
2022-07-02 11:30:17 +02:00
Aevann1
bc41bb5584
testing, pls ignore
2022-07-02 11:29:01 +02:00
Aevann1
d0d15c319a
Poll rework ( #312 )
...
* poll rework
* forgot to do joinedload on comments
* Fix logic errors with voting, SQL syntax.
Kitchen sink commit from review of poll-rework changes:
1. Fix seed-db.sql syntax error.
2. Fix SQL patch file duplication of *submissions* tables rather
than one set of submissions and one for comments.
3. Start makeshift SQL patch folder, since this is a large change
that contributors may wish to apply to their local instances.
4. Fix checkbox (non-`exclusive`) polls being unable to be
unchecked. For consistency with `exclusive` polls, they should.
5. Fix changing the option of an `exclusive` poll when both
exclusive and non-exclusive options are present in one comment/
post causing the non-exclusive options to become unchecked.
(which, by my reading of SQLAlchemy `Query.one_or_none()`
really could break quite badly in some cases).
* link relationships with their counterparts
* small modification to poll unchecking
Co-authored-by: TLSM <duolsm@outlook.com>
2022-07-02 08:48:04 +02:00
Aevann1
83228249ad
fix marseyschizochadseethecapylovepat
2022-07-02 03:38:32 +02:00
Aevann1
77c1f96383
remove empty anchor tags
2022-07-02 02:54:59 +02:00
Aevann1
28786342dc
fix snappy archiving images
2022-07-02 02:25:58 +02:00
Aevann1
f56be06eb8
add hole pinning
2022-07-02 01:11:48 +02:00
Aevann1
9ffc3015e2
testing
2022-07-01 20:09:56 +02:00
Aevann1
e8f5827c5e
more testing
2022-07-01 15:34:11 +02:00
Aevann1
1676572f09
test
2022-07-01 15:15:44 +02:00
Aevann1
5bbd14ebd6
testing
2022-07-01 15:11:41 +02:00
Aevann1
2fd8e88ceb
try fixing inbound bandwidth
2022-07-01 13:32:01 +02:00
Snakes
1b9237ceaf
Add assetcache.asset_siteimg, has_logo.
...
Commit began by changing the duplicated SITE_NAME conditional in the
header to use a `has_logo` param, much like the recent `has_sidebar`.
From there, a need to include site-specific assets in assetcache was
revealed, adding the `asset_siteimg(...)` macro. This was applied
quite broadly, though not comprehensively.
2022-07-01 01:55:53 -04:00
Snakes
39c945f7ca
LGB: Initial sidebar & const.
2022-07-01 01:08:15 -04:00
Aevann1
05aa116a8a
cutting down on query volume
2022-07-01 03:18:06 +02:00
Aevann1
461eba7427
fix issue with reddit domain replacement
2022-07-01 01:06:39 +02:00
Aevann1
cba02b9e4b
fix issue with code blocks
2022-07-01 01:01:10 +02:00
Aevann1
95dc6bc4f3
fix old.reddit bug
2022-07-01 00:39:48 +02:00
Aevann1
aa53296d07
Revert "remove "filter" from allowed styles"
...
This reverts commit 14d929623e
.
2022-07-01 00:18:05 +02:00
Aevann1
14d929623e
remove "filter" from allowed styles
2022-07-01 00:03:32 +02:00
Aevann1
070945d98a
cut down on the number of queries
2022-06-29 09:22:18 +02:00
Aevann1
790a814b36
make "show more" button look nicer
2022-06-29 04:35:52 +02:00
Aevann1
e7460874e9
double the timeout duration for sanitize()
2022-06-29 03:39:33 +02:00
Aevann1
b6a5d010ca
add "show more..." button
2022-06-29 02:55:44 +02:00
Aevann1
3ed41a0835
remove insane number of line breaks in rendered HTML
2022-06-29 01:53:41 +02:00
Snakes
08c2ec7223
Make pin disabling site-specific.
2022-06-28 02:27:25 -04:00
Aevann1
42a6b5731a
sneed
2022-06-28 08:17:21 +02:00
Aevann1
4580cf534d
fix strikethrough regex
2022-06-28 08:05:49 +02:00
Aevann1
b873492dd0
fix strikethrough, v2
2022-06-28 07:52:29 +02:00
Aevann1
50121f6960
fixed strikethrough
2022-06-28 07:41:21 +02:00
Aevann1
cd811d7b9d
consistent lottershe naming
2022-06-28 02:54:44 +02:00
Aevann1
a0cb5874cc
refactor push notifs
2022-06-27 21:02:24 +02:00
Snakes
d68f2a604a
Check bot award timers more frequently.
...
Also: change to docker-compose.yml is to see if it'll fix the Github
tests failing. Lumped in here because it's too dumb to make a commit
for by itself.
2022-06-27 02:15:35 -04:00
Aevann1
e527dec36b
fix mentions in marquees
2022-06-27 07:14:45 +02:00
Snakes
1d500917ad
Improve header currency display style.
2022-06-27 00:09:32 -04:00
Aevann1
52a8a219ae
make poorcel-mode device-specific
2022-06-27 05:46:32 +02:00
Aevann1
46c9c719d0
fixed 500 error
2022-06-27 04:22:12 +02:00
Aevann1
b5d993569f
embed rework
2022-06-27 03:00:45 +02:00
Snakes
e0c3c79902
WPD: Require flairs on all posts.
2022-06-26 03:42:56 -04:00
Snakes
268c23e2f8
WPD: make holes more flair-like in UI.
2022-06-26 03:42:15 -04:00
Snakes
cd556b6d8e
Refactor UI name of hole/sub to constant.
2022-06-26 03:41:28 -04:00
Aevann1
1367d944da
commit only when status code is 200
2022-06-26 07:37:36 +02:00
Aevann1
3b8188fd67
fixed version of d83d47e280
2022-06-26 03:22:05 +02:00
Aevann1
a1b137447e
Revert "reduce query volume #1"
...
This reverts commit d83d47e280
.
2022-06-26 03:12:31 +02:00
Aevann1
cff34fb3a4
reducing query volume, #2
2022-06-26 03:11:02 +02:00
Aevann1
d83d47e280
reduce query volume #1
2022-06-26 02:50:47 +02:00
Aevann1
c1d227e2b6
exclude poll bots from "simps for" lists
2022-06-25 22:24:47 +02:00
Snakes
aaf718c78c
Fix timeout in sanitize from link_fix_regex.
...
h/t to @official-techsupport for finding and help fixing this bug.
When given certain pathological input, `sanitize` would time out
(notably only on posts, rather than comments, perhaps due to the
longer maximum length of input). For example, using as input the
result of:
with open("test.txt", "w") as f:
for i in range(26):
f.write(f":{chr(ord('a') + i)}: ")
f.write('x' * 20_000)
We believe this to be because of some combination of the greedy
quantifiers and the negative lookahead before the match. The regex
was rewritten to (in theory) have much more linear performance.
2022-06-25 01:28:43 -04:00
Aevann1
c5c21da76f
validate colors
2022-06-24 19:32:31 +02:00
Aevann1
f34c4e1196
stop using app.config for our own stuff
2022-06-24 17:08:57 +02:00
Aevann1
fcf600cb35
fix this https://chapotraphouse.club/post/79771/workaholics-are-worse-for-society-than/2183396?context=8#context
2022-06-24 16:45:19 +02:00
Aevann1
9593dc58dd
move regex from helpers.const into its own helper file
2022-06-24 16:30:59 +02:00
Aevann1
6f6d01c1c6
actually use the get functions
2022-06-24 15:19:53 +02:00
Snakes
ce79b1d84b
PCM: lottery duration back to 1wk.
2022-06-23 22:40:51 -04:00
Aevann1
6463cbd1f4
"kike" slur filter modification
2022-06-24 00:33:39 +02:00
Aevann1
cff28b2070
add i.reddit.com to reddit_domain_regex
2022-06-23 22:00:49 +02:00
Aevann1
2c1d1aceff
fix this https://chapotraphouse.club/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2178607?context=8#context
2022-06-23 21:43:49 +02:00
Aevann1
810e80c010
fix issue with snappy url archival
2022-06-23 21:41:23 +02:00
Aevann1
39cf7fc48b
refactor normalizing urls at runtime (I put the function in comment.py cuz there were weird import errors that i didnt wanna fix)
2022-06-23 17:47:57 +02:00
gooseman
6fec7d51d9
make me notified ( #308 )
2022-06-22 21:37:27 -04:00
Aevann1
e42227ab67
add glowie marseys
2022-06-23 02:34:37 +02:00
Aevann1
233f24c0c4
make reddit notifs look neater (again)
2022-06-23 01:45:09 +02:00
Aevann1
262138b542
make reddit notifications look neater
2022-06-23 01:16:59 +02:00
Aevann1
8f2c2885d2
include psot body in reddit mentions too
2022-06-23 00:40:53 +02:00
Aevann1
0e1177843e
remove the need for alert flag on sanitize()
2022-06-23 00:12:47 +02:00
Snakes
26273d0997
Revert "delete empty <a> tags to prevent exploits"
...
This reverts commit 5f78b4e365
.
This commit is breaking @-mentions in a great many contexts and
I'm not quite sure how to fix it right now.
2022-06-22 18:00:23 -04:00
Aevann1
5f78b4e365
delete empty <a> tags to prevent exploits
2022-06-22 23:12:02 +02:00
Aevann1
365d21ff9c
fix this https://i.imgur.com/F0OiGKH.png
2022-06-22 23:00:09 +02:00
Aevann1
e1d0269a81
fix 413 error for patrons
2022-06-22 21:12:12 +02:00
Aevann1
ebdda8c412
add poll_thread (fix)
2022-06-22 20:01:22 +02:00
Aevann1
414eb12410
add poll_thread
2022-06-22 20:01:00 +02:00
Aevann1
71d892a8a9
get file extension
2022-06-22 19:44:43 +02:00
Aevann1
20585ca543
add a shortened endpoint for static images and rename loading.webp to l.webp (to save bytes)
2022-06-22 17:51:19 +02:00
Snakes
e2cd25db67
WPD: limit hole creation to JL2+.
2022-06-21 01:20:21 -04:00
Snakes
4166b2d2f0
Content: chadsoy x2, more neo-gTLDs.
2022-06-21 01:03:33 -04:00
Marco Rebhan
3c5e2c9455
Include message text in off-site mentions
2022-06-20 18:32:46 -04:00
Snakes
f59556cac3
stats: add WAU based on activity timestamp.
2022-06-20 16:33:47 -04:00
Snakes
f6b6997f61
Persist activity timestamp to users.
2022-06-20 16:25:03 -04:00
Snakes
dee8eb5154
Replace loading.webp with new marseyloading.
2022-06-19 22:15:33 -04:00
Aevann1
7c5e8c04b0
add .dev tld
2022-06-19 22:32:12 +02:00
Aevann1
ef3fbbf520
adjusting greentext regex
2022-06-19 22:22:36 +02:00
Aevann1
f77a7b7cfc
fixed double quoting and triple quoting, etc
2022-06-19 20:21:25 +02:00
Aevann1
3eb788103c
allow only ascii characters in links ( https://rdrama.net/comment/2150032 )
2022-06-19 19:25:55 +02:00
Aevann1
d9cdbd0015
return to only allowing images/videos/audio
2022-06-19 18:56:45 +02:00
Aevann1
5ddde69ac9
greentext fix
2022-06-19 17:22:06 +02:00
Aevann1
45b1b61760
added greentext
2022-06-19 17:05:50 +02:00
Aevann1
06677d269e
refactor process_video
2022-06-19 16:49:44 +02:00
Aevann1
5d74693c22
try converting webm to mp4
2022-06-19 15:03:14 +02:00
Snakes
e5193cbd46
Fix mention sanitize when `g.v` not present.
...
This bug was discovered when lottery.check_if_end_lottery_task was
failing due to a stack trace thru end_lottery session < badge_grant
< send_repeatable_notifications < sanitize L208. In particular, when
`flask cron` (helpers/cron.py) executes, it does not set g.v, whereas
this code previously assumed that g.v : (None + User) and did not
check for its presence.
2022-06-18 21:22:04 -04:00
Aevann1
193615a441
make sure thumbnails are always lower than 8 MB
2022-06-18 23:11:53 +02:00
Aevann1
eba4452d79
fix 500 error
2022-06-18 22:41:00 +02:00
Aevann1
b34dd88560
remove legacy code in video upload (thx @everyone)
2022-06-18 18:23:10 +02:00
Aevann1
453d83856e
add .press tld
2022-06-18 18:07:57 +02:00
Aevann1
ccdabcba29
allow uploading of all types of files (using lain.la)
...
+ allow multiple file upload in bios and messaging admins
2022-06-18 17:53:34 +02:00
Aevann1
56f8cf793e
give visible bots a body column (so their comments are searchable)
...
+ don't sanitize zoz/longpostbot/aj comments
2022-06-18 17:37:01 +02:00
Aevann1
f60db1598d
replace "g.db.query" on pkeys with the much more efficient "g.db.get"
2022-06-18 02:57:23 +02:00
Aevann1
c01d53aa0d
make mentioning case-insensitive again
2022-06-18 00:03:23 +02:00
Aevann1
fae0bee0d9
Refactored mention sanitization (stolen commit from themotte)
2022-06-17 22:37:27 +02:00
Aevann1
a771596d25
videos bullshit
2022-06-17 22:23:04 +02:00
Aevann1
38c12209fb
move from os.sytem to subprocess.run, and fix bug
2022-06-17 22:16:22 +02:00
Snakes
a0d923e759
Use subprocess.check_call in media.py
2022-06-17 16:15:42 -04:00
Aevann1
30ed6daa26
fix RCE, thank you @Camas
2022-06-17 20:36:34 +02:00
Aevann1
35875d69f6
stop replacing "nitter.net" with "twitter.com" (to fix this shit https://chapotraphouse.club/post/77517/xueen-ezra-is-taunting-the-pigs/2132884?context=8#context )
2022-06-16 18:46:32 +02:00
Aevann1
0fb48bc380
make reddit_notifs_jl_min default to be 1
2022-06-16 16:15:24 +02:00
Aevann1
cab92d3c24
add marsey.cat to safe list
2022-06-16 14:36:43 +02:00
Snakes
46520a9f8c
Site-specific: change lotto for PCM.
2022-06-15 22:23:21 -04:00
Snakes
a8155d964a
Kitchen sink: emoji content, assert, assetcache.
...
These are all minor and uncontroversial enough it just felt gross
making multiple commits.
- Adds marseymummified.
- Changes the new `raise ValueError(...)` in badge_grant to
an `assert`.
- Expands assetcache to a convenient grab bag of JS files.
2022-06-15 17:17:31 -04:00
Snakes
7e54f858d3
Amend f8ae2a3d17c6: revert >= logic, fail loudly.
...
First, the apparent errors with >= 9 and 99 in the Marseys and
referrals code after the refactor are not actually bugs: they were
bug fixes mixed in with the refactor to fix an off-by-one.
Next, instead of failing silently on the `not user` branch in
badge_grant, we throw a ValueError. This retains the current
behavior where users get 500s to report while also enforcing the
assertion near the edge of the function.
2022-06-15 16:32:25 -04:00
Snakes
f8ae2a3d17
Amend 3bc98f0a6b84: minor logic, style.
2022-06-15 16:08:26 -04:00
Aevann1
3bc98f0a6b
extend TLSM's badge_grant() to almost all instanes where badges are granted
2022-06-15 21:33:21 +02:00
Aevann1
cdcef7d01d
Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
2022-06-15 15:32:55 +02:00
Aevann1
ff9c7c17fb
readjust prophet muhammed (ﷺ) slur filter
2022-06-15 15:32:52 +02:00
Snakes
dfe0c64d99
Deduplicate site-specific constants, add SNAKES_ID.
2022-06-14 23:39:37 -04:00
Snakes
3301e238d6
Content: alphabet emoji, christian list.
2022-06-14 14:37:45 -04:00
Snakes
c61375288f
Content: add TLD to sanitize.
2022-06-14 03:48:02 -04:00
Aevann1
0f49c8e32f
replace spaces with tabs
2022-06-13 20:33:25 +02:00
Aevann1
d8fff0bc72
Revert "Fix giant patting hand UI bug."
...
This reverts commit 7915eb8390
.
2022-06-13 20:31:28 +02:00
Aevann1
f4aa70cc74
Revert "Add user title coin cost parameter."
...
This reverts commit dece3fd460
.
2022-06-13 20:10:53 +02:00
Aevann1
07f2c0d2ca
make marsey counter work everywhere (not just comments)
2022-06-13 20:05:24 +02:00
Aevann1
6d1f7646ba
elaborate in lottershe message
2022-06-13 18:30:27 +02:00
Snakes
acde2c856b
Enable JL2 viewing shadowbanned comments.
2022-06-12 05:48:27 -04:00
Snakes
7915eb8390
Fix giant patting hand UI bug.
...
Despite being very fun, this fixes the recently discovered bug where
placing '#' or '!' within the 'pat:' suffix of a patted emoji causes
the enclosing <span> to not be given the proper CSS `display` or
`position`, leading to the hand being sized relative to the comment
bounding box rather than the emoji box.
This should be backward compatible. The only posts it wont fix are
existing ones with the giant hands. Main example being:
https://rdrama.net/h/slackernews/post/76302/
2022-06-12 02:22:38 -04:00
Snakes
f76b94b58d
Content: keywords updates.
2022-06-11 22:08:48 -04:00
Aevann1
85b4158d5b
"1 lottery tickets" -> "1 lottery ticket"
2022-06-11 16:52:20 +02:00
Aevann1
adefc09ae9
rename "dramacoins" to "coins", so that it works on other sites
2022-06-11 16:40:53 +02:00
Aevann1
cf83a996bd
let losers know how much coins the winner won
2022-06-11 16:40:14 +02:00
Aevann1
831344b723
small image embed improvements
2022-06-11 14:21:59 +02:00
Aevann1
a082105ab8
remove weird trailing tabs
2022-06-11 11:56:16 +02:00
Aevann1
1f42d228c1
remove 'apnic' from word list
2022-06-11 11:27:55 +02:00
Snakes
28002844e4
offsitementions: Fix notif logic.
2022-06-10 22:04:17 -04:00
Aevann1
d84a4c7ce9
convert monthly marseybux into a cron task
2022-06-10 22:23:01 +02:00
Aevann1
654ddc4157
re-refactor normalize_url
2022-06-10 22:02:15 +02:00
Aevann1
36a1797276
escape / in imgur_regex
2022-06-10 21:04:25 +02:00
Aevann1
4910681c6f
make the default HOLE_COST 0 (for testing purposes)
2022-06-10 20:14:24 +02:00
Aevann1
6a18c31ced
exclude localhost from reddit notifs
2022-06-10 17:30:30 +02:00