13 Commits

Author SHA1 Message Date
David Woloszyn
7679452caf MDL-77846 core: Make endpoint revision number checks stricter
In some places we prevented cache poisoning, in others we did not. We
also did not place any restriction on the minimum value for a revision.

This change introduces a new set of functions for configonly endpoints
which validates the revision numbers passed in. If the revision is
either too old, or too new, it is rejected and the file content is not
cached. The content is still served, but caching headers are not sent,
and any local storage caching is prevented.

The current time is used as the maximum version, with 60 seconds added
to allow for any clock skew between cluster nodes. Previously some
locations used one hour, but there should never be such a large clock
skew on a correctly configured system.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-10-04 01:24:19 +00:00
Jonathan Harker
55fff62fb4 MDL-72646 theme: update font download MIME types, RFC-8081 2022-02-16 19:10:05 +13:00
Damyon Wiese
95b06c13c6 MDL-40759 icons: Refactor icon system to be extensible. 2017-03-17 15:51:29 +08:00
Matteo Scaramuccia
203c5bce27 MDL-57789 files: Reviewed lifetime value 2017-02-25 23:42:37 +01:00
Matteo Scaramuccia
ed0a1cd708 MDL-57789 files: Use immutable Cache-Control extension. 2017-02-25 23:42:35 +01:00
Gareth J Barnard
eb1861983a MDL-46728 themes: WOFF2 fonts are not supported. 2015-01-29 16:11:43 +00:00
Marina Glancy
1bc60971b1 Merge branch 'wip_MDL-44854_master' of git://github.com/gjb2048/moodle 2014-04-01 10:37:22 +08:00
Gareth J Barnard
7cc6112219 MDL-44854 theme: 'svg' font type not served. 2014-03-31 11:10:13 +01:00
Gareth J Barnard
9e98a0c04f MDL-44850 theme: 'eot' font type not served. 2014-03-31 11:01:30 +01:00
Sam Hemelryk
feb34ff4e8 Merge branch 'w30_MDL-23493_m26_fonts' of https://github.com/skodak/moodle 2013-07-24 19:19:47 +12:00
Petr Škoda
964485a3a0 MDL-23493 fix borked regex matching for non-standard font extensions 2013-07-24 08:58:23 +02:00
Petr Škoda
64a8058e18 MDL-40545 convert font cache to localcachedir 2013-07-20 14:11:40 +02:00
Petr Škoda
9ba6076cff MDL-23493 add support for theme fonts 2013-07-20 12:47:08 +02:00