Commit graph

49 commits

Author SHA1 Message Date
lda
af4fd5dceb Update licensing text for 2024 (#48)
Co-authored-by: Jordan Bancino <jordan@bancino.net>
Reviewed-on: Telodendria/Telodendria#48
Co-authored-by: lda <lda@freetards.xyz>
Co-committed-by: lda <lda@freetards.xyz>
2024-01-04 19:32:03 -05:00
1fee47a628 Use Makefiles instead of a custom script (#38)
This pull request also requires the use of the external [Cytoplasm](/Telodendria/Cytoplasm) repository by removing the in-tree copy of Cytoplasm. The increased modularity requires a little more complex build process, but is overall better. Closes #19

The appropriate documentation has been updated. Closes #18

---

Please review the developer certificate of origin:

1. The contribution was created in whole or in part by me, and I have
the right to submit it under the open source licenses of the
Telodendria project; or
1. The contribution is based upon a previous work that, to the best of
my knowledge, is covered under an appropriate open source license and
I have the right under that license to submit that work with
modifications, whether created in whole or in part by me, under the
Telodendria project license; or
1. The contribution was provided directly to me by some other person
who certified (1), (2), or (3), and I have not modified it.
1. I understand and agree that this project and the contribution are
made public and that a record of the contribution&mdash;including all
personal information I submit with it&mdash;is maintained indefinitely
and may be redistributed consistent with this project or the open
source licenses involved.

- [x] I have read the Telodendria Project development certificate of
origin, and I certify that I have permission to submit this patch
under the conditions specified in it.

Reviewed-on: Telodendria/Telodendria#38
2023-11-01 12:27:45 -04:00
6ef965d1e0 Apply patch to make MatrixErrorCreate() take a custom message. 2023-08-05 19:26:03 +00:00
96a1d3c3c4 Move stream assignment; this makes debugging easier. 2023-06-04 18:50:02 +00:00
95ceba0645 Add length calculations to JsonEncode() so we can set Content-Length. 2023-05-06 19:23:13 +00:00
098eed44a0 Fix bug in MatrixWellKnown(), begin /_matrix/client/v3/capabilities 2023-04-25 18:37:25 +00:00
ffeb45375e Implement /_telodendria/admin/privileges
Note that it's not exactly as the proposal defines it; theres a bit more
nuance that will be documented soon.
2023-04-19 18:52:05 +00:00
83971dfaff Refactor routing system to use HttpRouter. 2023-04-14 21:20:56 +00:00
9ec330f40a Log once we get the response status, not right when we get the request. 2023-03-22 18:13:59 +00:00
f3c4c0ac65 Add a global log configuration.
This is the easiest and cleanest way to get logging into some of the
fundamental APIs, such as the database and TLS APIs. We don't want to
have to pass logging functions to those, but they can safely use the
global logging configuration.
2023-03-22 14:52:04 +00:00
5289c16e2b Convert all code to new Stream API.
Also made a number of improvmements to tt, making it compatible with more
shells.
2023-03-18 14:32:09 +00:00
65f4c90df3 Rename HttpStream() to HttpServerStream() to match HttpClientStream() 2023-03-16 02:17:48 +00:00
7b22fb02a2 Implement pretty-printing option in Json.
Telodendria itself doesn't use it, but the json CLI tool does.
2023-03-08 17:15:43 +00:00
36169181dd Build basic framework for creating static pages.
The login fallback, as well as the user-interactive authentication
fallbacks, are static HTML pages.
2023-02-28 16:51:40 +00:00
b60cac53e5 Make JsonValueString() call StrDuplicate(); refactor code to behave properly. 2023-02-24 00:17:56 +00:00
85380efa3c [#48] Fix bug in MatrixGetAccessToken() 2023-02-16 01:33:46 +00:00
e0f7c133d1 Add a non-JSON landing page. This is the basis for other HTML pages. 2023-01-17 20:29:16 +00:00
b0b2f11158 Refactor endpoint authentication flow.
Instead of one MatrixAuthenticate() function, we'll do
MatrixGetAccessToken(), and then UserAuthenticate(). This allows us to
give different error messages depending on what the user provided and what
the server state is.
2023-01-17 01:36:22 +00:00
cc95c10f44 Move client well-known generation to MatrixClientWellKnown() function.
We'll be using this for client login.
2023-01-16 22:02:08 +00:00
30c3690287 Renamed String.h to Str.h because Windows is dumb. 2023-01-08 04:38:06 +00:00
08b36c071c Begin prototyping User.h 2023-01-07 15:51:56 +00:00
0a29aa7f5a Move string related functions to a new String API.
I think we have accumulated enough string functions that they should
have their own API. This shortens the function names a bit too.
2023-01-07 04:33:32 +00:00
3c8d89a52e Update copyright year 2022-12-26 15:52:52 +00:00
c9e42ff813 Break out UserInteractiveAuth into its own header.
We'll need this because user interactive auth will get complicated and
messy very soon.
2022-12-26 15:48:21 +00:00
b8027e1aaf Fix compiler warning on some platforms. 2022-12-19 22:21:24 +00:00
88a11650cf Formatting. 2022-12-19 21:54:01 +00:00
c0bd70a391 Add MatrixUserValidate() and MatrixHistoricalUserValidate() 2022-12-18 20:20:08 +00:00
f837988156 Begin work on validating registration request. 2022-12-16 22:56:35 +00:00
836b61dc42 Begin implementing a few helper functions 2022-12-16 22:06:01 +00:00
fb06d17b16 Abstract user interactive auth out to function. 2022-12-16 20:08:16 +00:00
5080d066ab Remove some debug statements; make route error more specific. 2022-12-14 18:41:01 +00:00
e7e25cade5 Fix an instance of setting response headers after they were sent. 2022-12-14 15:02:10 +00:00
fe2c4de1b6 Remove unused variable. I thought I'd use it but I probably won't. 2022-12-11 00:19:17 +00:00
d56aaa921d Fully abstract route paths, move them to Routes.h. 2022-12-11 00:14:22 +00:00
3b636a9d22 Update routing slightly, apply #35 to new RouteLogin 2022-12-10 15:41:19 +00:00
70bdf81df7 Fix references to old LOG_ constants 2022-11-24 18:51:07 +00:00
efbbf42a6e Fix memory and connection closing errors. 2022-11-08 01:05:28 +00:00
6992f36c86 Fix segfault in fclose() on Linux. 2022-11-02 00:35:05 +00:00
80366fc294 Fix a few more calls to free() 2022-10-13 12:27:24 -04:00
90166882b0 Remove an unnecessary variable. 2022-09-30 12:48:33 -04:00
45324ce77a Implement /_matrix/client/versions and /.well-known/matrix/client 2022-09-29 13:41:26 -04:00
0ec976d1dd Fix HttpUrlDecode memory issue; write pathParts array 2022-09-28 14:45:45 -04:00
b5d538f2ce Cleaned up argument parsing to match what was in the docs 2022-09-24 19:41:39 -04:00
55967c2d75 Start work on routing 2022-09-23 08:06:24 -04:00
d7a1f7411d Send M_UNKNOWN on all requests for now. 2022-09-16 11:49:21 -04:00
d0fb926f2a Add error generation logic. 2022-09-16 11:27:34 -04:00
13763eb77b Format code 2022-09-14 17:15:39 -04:00
184866532a Spec: Implement CORS 2022-09-14 17:15:05 -04:00
7cc08e67fc Begin Matrix-specific work. 2022-08-28 15:55:48 -04:00