mirror of https://github.com/requarks/wiki
getPagePath() used a regex to extract locale prefixes from file paths, but any top-level folder with a 2-letter name (e.g. AI/, CI/) or 2+2-letter hyphenated name (e.g. CI-CD/) matched the BCP 47 locale pattern, causing the extracted non-existent locale to violate the pages_localecode_foreign FK constraint on insert. Now validates the extracted locale against the configured locales (WIKI.config.lang.code + WIKI.config.lang.namespaces) before accepting it.pull/7958/head
parent
f0f71536ab
commit
c37c7fb933
Loading…
Reference in new issue