Commit Graph

123 Commits

Author SHA1 Message Date
08ae044a95
server: Pass in logger to database back-end 2019-01-01 18:59:43 +10:00
b57490858b
server: Fix log-in logic 2019-01-01 09:25:39 +10:00
a70758010d
server: Yield increment and discard requests. 2018-12-31 18:17:13 +10:00
290bed3798
server: Re-factor for async server back-end 2018-12-31 17:13:30 +10:00
bf36f3825c
traits: Use thread-local storage for database objects.
SQLAlchemy really gets confused if you get objects from different
database sessions mixed up, causing things to not be recorded when they
should.

To counteract this, use thread-local storage for the connection and its
database objects.  This necessitates that we have a way to create new
connections to the database when a new thread is spawned.
2018-12-28 17:44:37 +10:00
b4761236d6
traits: Add logging detail 2018-12-26 13:09:00 +10:00
e9dc9c50fe
server: Debug log-in, add cache control headers. 2018-12-26 12:45:50 +10:00
5a8ce8063e
server: Move static files to /static. 2018-12-26 12:27:48 +10:00
f20f75a96a
server: Discard traits on legit classification. 2018-12-21 18:59:53 +10:00
653b56d440
server: Drop references to AvatarHash score and count 2018-12-18 22:25:28 +10:00
d1cbf4da6f
server: Fix dumping of traits 2018-12-18 21:49:30 +10:00
e3ce7c9393
server: Fix user trait retrieval. 2018-12-18 21:41:23 +10:00
12ba414538
server: Initialise traits at startup 2018-12-18 21:36:51 +10:00
797bf47580
server: Retrieve traits on user fetch. 2018-12-18 21:31:40 +10:00
661e9d6d7d
server: Update traits on user classification. 2018-12-18 21:21:04 +10:00
3638d0b345
server: Re-locate pool initialisation 2018-12-05 22:33:54 +10:00
4e3c1f6be4
server: Update avatar hash score on classify. 2018-12-05 22:24:09 +10:00
3f6d0378fe
crawler, server: Move hashing to crawler.
- When we encounter a new user, retrieve their avatars and hash them.
2018-12-05 22:17:06 +10:00
ebd10eee22
hasher: Add cryptographic hashing functions.
For finding exact matches.
2018-11-28 06:15:16 +10:00
008da849b8
server: Show number of hash instances 2018-11-28 05:35:14 +10:00
f67dc7ea20
server: Emit scores with hash value.
We'll ultimately be using this as another trait to classify users by
(whether the avatar has been seen before).  The UI will therefore need
this information.
2018-11-27 21:20:26 +10:00
cd3c444f26
server: Actually commit calculated hash and link it to avatar. 2018-11-27 20:58:13 +10:00
2d28d6d0ff
server, hasher: Add avatar image hashing.
This uses one of a number of supported algorithms to hash a given
avatar, namely `phash`, `dhash`, `average_hash` or `whash`.
2018-11-26 21:31:44 +10:00
5590bdc523
server: Handle empty admin IDs case 2018-11-26 21:01:23 +10:00
72a96c6b6f
server: Add new log-in endpoint
This uses the earlier `Account` table to authorise users by checking
their password against a hash of it in the database.  This is
implemented using `passlib` and uses the following hashes (in this
order): `argon2`, `scrypt` or `bcrypt`.
2018-11-26 07:55:40 +10:00
d860d0c293
server: Allow explicit defintion of user order. 2018-09-08 11:50:24 +10:00
f277f1f45c
server: Tweak handling of after_user_id/before_user_id 2018-09-08 11:45:39 +10:00
2cd4d06c31
server: Pick the first N users when using after_user_id. 2018-09-08 11:20:11 +10:00
43158c4a1e
server: Fix missed positional argument. 2018-09-07 23:53:09 +10:00
b7e81c56df
server: Expose IDs of words, word adjacencies and hostnames. 2018-09-04 20:48:58 +10:00
83b06e8fdb
server: Add more handlers
This allows us to present more data to the frontend.
2018-09-03 22:21:00 +10:00
4c897aa64e
server: Call logging functions via extdlog. 2018-08-04 12:20:43 +10:00
659fb43a88
server: Use audit for some messages 2018-08-04 12:17:53 +10:00
ddd30da1b2
server: Expose HAD creation time 2018-08-03 22:41:04 +10:00
958e9fb82f
server: Pass through API request limit interval. 2018-07-01 18:58:55 +10:00
e5ac25cbd8
server: Don't cast parameters
`argparse` should do that for us.
2018-07-01 14:42:04 +10:00
9e2f145cbc
server: Pass in crawler settings 2018-07-01 14:25:16 +10:00
d7147b2d8e
server: Expose user hostname scores. 2018-06-03 18:30:00 +10:00
a4d7a0ca7a
server: Tally up the hostnames linked to by users. 2018-06-03 18:00:56 +10:00
f55795675d
server: API to use own HTTP client instance, don't pass to crawler. 2018-06-02 16:52:20 +10:00
40ad79dd3d
server: Report back error 400 on failed OAuth callback. 2018-06-02 12:47:02 +10:00
738794f0d5
server, crawler: Add ability to make non-members admins
This is done by specifying the user's UID on the command line.
2018-06-02 11:02:07 +10:00
abf0820a9a
server: Set cache control on newcomers feed.
Otherwise the browser caches the response.
2018-05-02 21:46:05 +10:00
a4d5836016
server: Set User Agent on HTTP client. 2018-05-02 20:35:00 +10:00
6d554920fe
server: Expose inspection count and next inspection time. 2018-03-03 13:24:29 +10:00
55b9c71d88
server: Report whether inspection is pending 2018-03-03 13:04:17 +10:00
bf0060e2be
server: Remove user from DeferredUsers on classification. 2018-03-03 12:59:44 +10:00
9f2402a2c8
server: Use dedicated database connection for session. 2018-03-02 22:05:13 +10:00
349c597394
server: Wrap database calls in try-finally
Close database in finally block.
2018-03-02 22:00:03 +10:00
af58e9006c
server: Connect to and close off database in worker.
Don't pass connection across threads, as it seems to leave the link
hanging.
2018-03-02 21:42:25 +10:00