this fixes a warning when the client doesn't include a space between
content-type and charset:
LOG: WARNING:Application sent content-type of "text/vcard;charset=utf-8" instead of "text/vcard"
The previous regex failed to parse PT15M which is a valid duration.
This version more correctly implements:
https://tools.ietf.org/html/rfc5545#section-3.3.6
It isn't totally correct as it incorrectly allows:
PT10H20S
Which is invalid due to no minutes being present. Oh well.
This guards against a crash when calling ->GetNSTag() on a non-object.
This may need to be refined in case we could be dealing with something
that's not a prop-filter.
It seems to be the case, that array indicies in $_SERVER are always
uppercase. Sadly I could not find any documentation of this but at
least with mod_php it is the case. Also a extensive search on github
projects seems to support this thesis.
On my installation the 'X-FORWARDED-PROTO' is even then uppercase when
its mixed case in the Header provided by the reverse proxy.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
The checks to test if a "modified" attribute was found in the
$valid array used in_array, which fails.
Replace this with array_key_exists calls.
This fixes https://gitlab.com/davical-project/davical/issues/108
[ $mapping['modified'] is a key in $valid, not a value. This is a
regression introduced in 970b61ac, for 1.1.5 ]
http://php.net/manual/en/function.setlocale.php says "Different systems
have different naming schemes for locales." This seems to be true for
platforms (eg Win vs. Linux), but on Debian AFAIR locales were always at
least two-part (de_DE), never just one (de). This seems to have been
broken in 504651a3, likely by mistake.
Also, switch locale immediately, even before writing to the database.
BTW, what happens when system default locale is configured to e.g. fr_FR
and the user selects "English" - does that work?
Same with external URLs
Also restrict Delete buttons on incoming binds to Admins: these binds
will usually live in other people's namespace, which we should not
alter, and may be restricted to default privileges (e.g. freebusy)
anyway
Previously, only the Admin or the principal herself could delete a
collection. Deletion is immediate and irreversible, so there is a risk
in allowing this. But it doesn't make sense to allow the creation of a
test collection and then block the subsequent clean-up.