n9k
4c5faf7dba
Use 303 See Other for {POST|GET}->GET redirects
2022-06-22 04:54:02 +00:00
n9k
6ae87be229
anonstream/__main__.py: disable Server header
2022-06-21 06:23:24 +00:00
n9k
a41f0d4f14
Escape disallowed cookie characters
2022-06-20 04:15:09 +00:00
n9k
46f9b0ec08
Reset websocket aliveness timer on first connecting
...
This should eliminate the possibilty of the websocket-closing background
task closing a newly opened websocket that hasn't yet ponged our ping
(if we have even sent a ping yet).
2022-06-20 04:15:09 +00:00
n9k
22c84bc230
Give timestamp to route handlers
2022-06-20 04:15:09 +00:00
n9k
90e1e2099a
Manual static folder
2022-06-20 04:15:08 +00:00
n9k
1581e6ac89
Minor logic formatting
2022-06-19 08:21:40 +00:00
n9k
1d5b446291
Track the last time users were sent chat messages
2022-06-19 08:21:40 +00:00
n9k
0b78a79111
Use single quotes
2022-06-19 07:53:31 +00:00
n9k
893c4273b0
Licence headers formatting for real
2022-06-17 01:10:27 +00:00
n9k
fc4a528b04
anonstream/__main__.py: tidy magic numbers for real
2022-06-17 00:48:04 +00:00
n9k
1ce4b4f568
v1.2.3
2022-06-17 00:41:20 +00:00
n9k
56ee52699a
Nojs chat form: on failure truncate long comments
2022-06-17 00:40:38 +00:00
n9k
e147aa0d22
Chat: always enforce length limits from config
2022-06-17 00:40:02 +00:00
n9k
3c5d3af40d
Typo: comment max length was name max length instead
2022-06-17 00:40:02 +00:00
n9k
88d3785ec6
Rename config section from 'thresholds' to 'presence'
2022-06-17 00:40:02 +00:00
n9k
dc5c4db3de
Move nojs refresh magic numbers to config
2022-06-17 00:40:02 +00:00
n9k
febb0e36d3
v1.2.2
2022-06-16 03:19:13 +00:00
n9k
617a687145
Give `create_app` a dictionary, not a file location
2022-06-16 03:15:21 +00:00
n9k
0e7bb62291
anonstream/__main__.py: tidy magic numbers
2022-06-16 03:14:46 +00:00
n9k
6746f7b859
Simplify starting: create anonstream/__main__.py
2022-06-16 02:56:38 +00:00
n9k
fdf4713c71
Licence headers in every new file
2022-06-16 01:31:10 +00:00
n9k
1c7818cc0b
Licence headers formatting
2022-06-16 01:31:10 +00:00
n9k
309b2ad54f
Control socket: minor redo exceptions
2022-06-16 01:05:18 +00:00
n9k
c07910b6c5
v1.2.1
2022-06-15 21:19:21 +00:00
n9k
50d03ba8d5
Control socket: specify users by token hash
2022-06-15 21:17:25 +00:00
n9k
f3e58fd3fa
Refactor info update background task
...
We now time the interval between consecutive tasks. This is more precise
than using the constant interval the task is supposed to run at since
there is some drift on each run (~0.004s).
2022-06-15 21:03:08 +00:00
n9k
e449caff5f
Reimplement `with_timestamp`, allow ints & floats
2022-06-15 20:54:55 +00:00
n9k
1f56e635b9
Ensure chat stays at bottom if names/tripcodes change
2022-06-15 20:39:06 +00:00
n9k
55a713991c
Nojs info: fix invisible uptime counter taking up space
...
Also adds "visibility: hidden;" to `disappear`. It would replace
"opacity: 0;" but Firefox acts weird with only visibility set, it only
half works until you switch between desktop and mobile view. IDK this
isn't that important.
2022-06-15 10:14:37 +00:00
n9k
46cd032510
CSS: always fullheight info in desktop view
2022-06-15 10:10:04 +00:00
n9k
d06a279be6
Sanitize newlines in usernames with js
...
Previously usernames with newlines in them actually went over multiple
lines.
2022-06-15 09:38:47 +00:00
n9k
dd1d98361f
v1.2.0
2022-06-15 09:09:03 +00:00
n9k
976abc0ede
WS: increase uptime drift tolerance for resending
2022-06-15 09:07:25 +00:00
n9k
5c8062466d
Control socket: overhaul finished for now
...
This unbreaks the commands broken by the last commit. Everything is
still better.
2022-06-15 08:55:44 +00:00
n9k
abfa3fe865
Control socket: overhaul implementation
...
This breaks some commands, everything else is better though.
2022-06-15 05:39:54 +00:00
n9k
65d28a6937
Event socket
...
This commit adds a unix socket on which you can receive internal events
as they happen. Currently the only supported event is a chat message
being added. Intended for external applications that depend on chat
messages, e.g. text-to-speech or Twitch Plays Pokémon.
2022-06-15 03:53:34 +00:00
n9k
0cb2f226d7
Control socket: view and delete eyes
2022-06-14 10:15:03 +00:00
n9k
70c5836ed0
Control socket: cleanup
2022-06-14 10:15:03 +00:00
n9k
3a1254d30f
Control socket: separate files
2022-06-14 10:15:00 +00:00
n9k
751664d1c4
More sensible variable names in colour generation
2022-06-14 08:50:31 +00:00
n9k
47ee5fe607
Take a range of contrasts for generating colours
2022-06-14 08:50:31 +00:00
n9k
1422bebd8e
Require Authorization header for broadcaster
...
As opposed to just the broadcaster token. This makes the broadcaster
username/password login mandatory, which previously was only mandatory
in the `auth_required` wrapper, but not elsewhere (so for example
leaving comments as the broadcaster was possible with the token only). A
less safe alternative to this would be to compare tokens in `check_auth`
once the Authorization header didn't match.
2022-06-14 08:50:31 +00:00
n9k
6ef3a77465
Explicitly reject weird tokens
...
Includes really long tokens
2022-06-14 08:50:31 +00:00
n9k
506f91a41b
Control socket: escape json whitespace if necessary
2022-06-14 08:49:54 +00:00
n9k
7db8895750
Eyes: send Retry-After header during cooldown
2022-06-14 03:33:14 +00:00
n9k
a594b6ed73
Eyes: only necessary arguments in exceptions
2022-06-14 03:32:12 +00:00
n9k
f081284876
Eyes: cooldown on creating new eyes
2022-06-14 03:02:45 +00:00
n9k
51265fb277
Eyes: delete old eyes
...
Also implements stack/queue behaviour where if the eyes limit would be
exceeded, either the new eyes cause the oldest eyes to be deleted OR
the new eyes aren't created at all. The default is the first option.
2022-06-14 02:58:11 +00:00
n9k
31ce80b2bf
Control socket: view and change users' attributes
...
Changing things without thinking about it is probably going to cause
weird undefined behaviour.
2022-06-14 02:40:20 +00:00