Yes, it's annoying to have generated output in version control, but not
sure yet if we want to keep Teal. It seems to do breaking syntax changes
somewhat often.
`dataform:data()` always returns the first table of collected values,
even if there are errors, so checking for its absence did not detect
when a required field (the only field, nickname) was missing.
Problem was type confusion where the `data` variable was expected to be
a string later but ended up being the table stored in the cache.
Here a different variable is used for the cache entry and the data.
Schemas can be either a boolean or a table (object) but since it only
checked for truthiness, the case of `false` would be handled
incorrectly.
There seems to be no tests that cover `then` and `else` being `false`,
only a couple that check the `if` keyword.
This allows certain media files to be loaded when navigated to directly in a
web browser.
Note that in some browsers (Chrome), the media gets transformed
internally into a HTML page with some basic styles, but these are blocked due
to our default-src policy of 'none' Although this could be unblocked with
style-src unsafe-inline, it is not our plan to fix this, because this would
have negative security implications.
The reason for our CSP is to prevent the file share service from being used to
host malicious HTML/CSS/JS. Yes, CSS can be malicious.
Our file share service is for uploading and downloading files, it is not a
substitute for website/content hosting.
Queries with start > last item would return one item, because there's
some boundary condition in binary_search().
This is here fixed by always applying filters that omit items outside
the requested range.
See also 2374c7665d0b
This fixes two problems:
1) Account invites that were created with a specific username were not
in fact restricted to that username.
2) Password reset invites were not restricted to resetting passwords,
but could be used to create an arbitrary new account if the client
or registration frontend (e.g. mod_invites_register_web) doesn't
handle/enforce the username.
This new validation ensures that registrations and resets are always for the
username specified in the invitation.
Somehow a user ended up with duplicate data preventing creation of the
new unique index needed for UPSERT (see 3ec48555b773).
This should eventually self-heal #1918 if the duplicate data is replaced
by the older DELETE + INSERT method.
Without any index at all, it will be slower.
This fixes the problem that an un-bracketed IPv6 address will not match
the first pattern (since it matches brackets) and instead the first
decimal digits will match the pattern meant to strip port numbers from
IPv4 addresses, e.g. 2001:db8::1 --> 2000
This pattern instead matches enough of a regular IPv4 address to make an
IPv6 address fall back to the last case.
This is meant as a way to diagnose e.g. issues creating indices.
It would have been nice to capture e.g. PostgreSQL notices, but LuaDBI
would need support for this first, see https://github.com/mwild1/luadbi/issues/62
This information can now be retrieved on-demand using the debug:cert_index()
command, so we don't need to log it after every scan (it is rather verbose).
These tests help to verify that various configurations translate into the
expected running TLS setups. Specifically right now we are checking the
correct certificate is served.