1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-11-23 00:33:44 +00:00
Commit graph

261 commits

Author SHA1 Message Date
660d911539 Add a generated tawashi.ini for debug runs. 2017-05-15 09:09:06 +01:00
5baaa8c8a8 Move installable html into the website/ subdirectory. 2017-05-14 18:14:52 +01:00
c7545f27cf Add some missing environment variables.
Also add a description of what they're for, at least
some of them.
2017-05-14 14:51:50 +01:00
72cadf20f2 Update html. 2017-05-14 14:50:16 +01:00
791902b8f0 Version bump to 0.1.5. 2017-05-14 03:43:48 +01:00
57dc0c7717 Add reason_code to string lookup. 2017-05-14 03:43:38 +01:00
ec80734625 Add http status codes and save dummy error into the mstch context. 2017-05-14 03:38:41 +01:00
4d31323bb1 Redirect to error.cgi when saving fails.
Not working yet, still getting there.
2017-05-12 22:46:54 +01:00
73707c2ad0 Revert "Pass the ResponseFactory object down to the Response itself."
This reverts commit 3bc6c56c03.
2017-05-12 22:18:03 +01:00
3bc6c56c03 Pass the ResponseFactory object down to the Response itself. 2017-05-12 09:36:01 +01:00
10da75caf5 Remove parameters from Response's constructor.
They can safely be defaulted and derived classes can
change their preferences later inside their constructor
if they need to.
2017-05-12 09:18:49 +01:00
f286507edf Delay fast subsequent pasties from the same IP. 2017-05-11 18:50:56 +01:00
9e63a648a1 Protect against fast flooding from the same ip. 2017-05-11 09:48:18 +01:00
f4991dfd5f Get latest duckhandy 2017-05-11 09:37:28 +01:00
c790507d94 Version bump to 0.1.4. 2017-05-10 20:50:28 +01:00
0323fb0ba6 Add source-highlight to docs.
It's useful as reference.
2017-05-10 20:49:40 +01:00
d449781c40 Add unit test for utf8 sanitization. 2017-05-10 20:47:24 +01:00
13e46ab1e6 Replace nullchars with #.
There is also a glib-based implementation but I'm not
sure about it yet.
2017-05-10 20:45:26 +01:00
ed1343bd7b Pass the istream to read_post instead of assuming std::cin. 2017-05-10 20:42:42 +01:00
c907e5dd49 Fix tawashi looking for the wrong config file. 2017-05-08 19:48:09 +01:00
9e1e18dcf0 Set default.lang if user's lang is not found. 2017-05-08 19:48:09 +01:00
07135f215c Delete get_env, which confused me a lot.
Get raw environment variables directly from main().
Add code to split on '=' in cgi_environment_vars and only pick
the ones that are interesting, just as before.
2017-05-08 19:46:14 +01:00
376b34c1d0 Add todo comment. 2017-05-06 21:57:31 +01:00
df384f5128 Add unit test for IndexResponse. 2017-05-06 21:49:46 +01:00
f5f19350ea Make SafeStackObject implicitly up-castable. 2017-05-06 21:48:45 +01:00
cd1be59cfa Pass the output stream and cgi_env to Response.
Mask the fact that they are globals, because I need
to be able to pass different classes in order to be
able to write unit tests for response classes.
2017-05-06 19:48:44 +01:00
8980a1d1ff I don't really need to store the page name in the base class. 2017-05-06 19:16:57 +01:00
ebed6fd1d4 Fix unit test for IniParser.
I'm not sure why graph needs the -eol part for the
value part, hopefully I'll find out at some point.
2017-05-06 18:40:39 +01:00
5b59ca3c41 Add unit test for IniFile and improve parser.
The test still fails because for some reason the parser
doesn't want to skip the trailing spaces in values.
2017-05-06 02:01:05 +01:00
b4291becf0 Add unit test for the SettingsBag. 2017-05-05 09:48:46 +01:00
85363e0db1 Add an empty unit test. 2017-05-04 23:03:53 +01:00
e1687c96ff Split tawashi into lib+executable to enable unit testing 2017-05-04 19:52:18 +01:00
bcb800ffef Buildfix in release 2017-05-04 19:41:18 +01:00
7646a04c51 Add user agent cgi variable. 2017-05-04 10:22:43 +01:00
c41e7ce65f Add more logging 2017-05-04 10:00:49 +01:00
92d8f1f73c Make logging level configurable in tawashi.ini. 2017-05-04 09:59:49 +01:00
c892ed2df8 Add logging lib spdlog. 2017-05-03 09:31:41 +01:00
73323c9ee7 Add plain text mode 2017-04-27 09:33:47 +01:00
457127aa04 Rename built binary to tawashi.cgi
Also copy html dir when doing make install.
2017-04-26 20:52:52 +01:00
4a57181ff6 Version bump to v0.1.3 2017-04-26 20:15:13 +01:00
3191203bfd Tell the browser returned plain text is utf8. 2017-04-26 20:12:59 +01:00
fbc9afc81c Remove invalid utf8 sequences from GET and POST. 2017-04-26 20:12:59 +01:00
f2bee62f0e Add utfcpp 2.3.4 to the project. 2017-04-26 20:02:49 +01:00
5377d25c72 Simplify the response pipeline.
There is no on_send() anymore, instead responses can
override the way the top-level mustache file is retrieved.
2017-04-26 09:17:57 +01:00
298aedc633 Version bump to v0.1.2 2017-04-25 22:56:35 +01:00
06920f8d84 Return pasties into a proper html page.
I don't think html escaping is needed, since pasties
go through the colorizer first.

I don't really like the workaround to not call on_send() when
I don't want the html output, it's a bit omg what's going on
there... I'll have to rewrite that bit.
2017-04-25 22:56:19 +01:00
54e737c171 Escape html in non-plaintext responses. 2017-04-25 22:09:46 +01:00
8a23dc1add An empty GET is synonym of m=plain 2017-04-25 22:09:46 +01:00
85784d231d Use houdini escaping instead of easy_curl.
Drop dependency on easy_curl.
2017-04-25 22:09:46 +01:00
c75c23fa36 Import houdini lib.
Will replace curl dependency soon.
2017-04-25 22:09:45 +01:00