f19d78222f
Clarify log entry
2017-05-16 22:16:33 +01:00
a1fa8cc1d2
Bugfix, don't redirect when the returned token is empty.
2017-05-16 22:06:36 +01:00
e77b9dafbb
Log when redirecting to the error page.
2017-05-16 21:52:48 +01:00
10da16051c
Organize exceptions so it's easy to log errors locally.
2017-05-16 18:54:00 +01:00
75bd68c53e
More logging
2017-05-15 23:47:01 +01:00
34c23659e9
Log files that mustache is trying to open as info.
2017-05-15 23:45:13 +01:00
0c7d08e299
Use a smaller type for string lengths.
2017-05-15 23:41:47 +01:00
8585e5baf5
Calculate string lengths at build time.
2017-05-15 23:38:39 +01:00
00f32d43d3
Fix displaying error messages in error response.
2017-05-15 21:46:35 +01:00
ba1b417f07
Fix wrong parameter in redirect address.
2017-05-15 09:33:31 +01:00
7fc7e2fba8
Remove test-only stuff that is not necessary anymore.
...
Env reads environment variables from the list it receives
from main(), so I can also pass it a forged list now
without needing extra classes with sometimes-virtual methods
or other cruft.
2017-05-15 09:18:11 +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
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
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
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
e1687c96ff
Split tawashi into lib+executable to enable unit testing
2017-05-04 19:52:18 +01:00