@bakery-framework/core 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakery-framework/core",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "Bakery framework core: handlers, router, config, session, caches, logger, compiler.",
5
5
  "keywords": [
6
6
  "bakery",
@@ -42,12 +42,16 @@ const GF_MAX_GSTATIC_PATH = 256
42
42
  * A path under `fonts.gstatic.com`, as the rewritten CSS references it:
43
43
  * `s/roboto/v47/KFOmCnqEu92Fr1Mu4mxK.woff2`.
44
44
  *
45
- * Every segment must start with an alphanumeric, which is what rules out `..`
46
- * and an empty segment (`//`) without a second pass over the string, and the
47
- * extension list keeps this to font payloads.
45
+ * Every segment must start with something other than a dot, which is what
46
+ * rules out `..`, `.` and a dot-file, and must hold at least that one
47
+ * character, which rules out an empty segment (`//`), all without a second
48
+ * pass over the string. The first character may be `_` or `-` because file
49
+ * names are base64url: Figtree v9's are `_Xms-HUzqDCFdgfMm4q9DbZs.woff2` and
50
+ * `_Xms-HUzqDCFdgfMm4S9DQ.woff2`, and an alphanumeric-only start answered both
51
+ * with a 404. The extension list keeps this to font payloads.
48
52
  */
49
53
  const GF_GSTATIC_PATH =
50
- /^[a-zA-Z0-9][a-zA-Z0-9._-]*(?:\/[a-zA-Z0-9][a-zA-Z0-9._-]*)*\.(?:woff2?|ttf|otf|eot|svg)$/
54
+ /^[a-zA-Z0-9_-][a-zA-Z0-9._-]*(?:\/[a-zA-Z0-9_-][a-zA-Z0-9._-]*)*\.(?:woff2?|ttf|otf|eot|svg)$/
51
55
 
52
56
  /**
53
57
  * How many distinct upstream assets this handler will keep on disk.