EntryDll
|
"pattern": "^[a-zA-Z0-9_.-]+\\.dll$", |
- DLL and assembly names can and should be allowed any ordinary file name characters, except for forbidden characters
"*/:<>?\|.
- Assembly names are case insensitive. Note that the current pattern accepts lower case file name extensions only:
.dll but not .DLL or .dLl etc.
- Keep in mind that the
. character in regular expressions is a class character that denotes any character. This renders every other character in the custom [] character class ineffective in the current pattern. If you want to express a period rather than any character then you must escape it with a \ backslash.
- File names must not start with a
. period character.
- Reserved file names exist.
Please update the pattern to:
{
"pattern": "^(?!(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|(?:[Cc][Oo][Mm]|[Ll][Pp][Tt])[1-9])\\.[Dd][Ll][Ll]$)[^\\\\/:*?\"<>|]+\\.[Dd][Ll][Ll]$"
}
Or, if assemblies can also be put in sub-folders:
{
"pattern": "^(?!(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|(?:[Cc][Oo][Mm]|[Ll][Pp][Tt])[1-9])(?:\\\\|\\.[Dd][Ll]{2}$))(?!.*\\\\(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|(?:[Cc][Oo][Mm]|[Ll][Pp][Tt])[1-9])(?:\\\\|\\.))(?:[^\\\\/:*?\"<>|]+\\\\)*[^\\\\/:*?\"<>|]+\\.[Dd][Ll]{2}$"
}
UniqueID (ModID definition)
|
"pattern": "^[a-zA-Z0-9_.-]+$", |
- Accepts every character due to
. not being \ backslash escaped in the custom [] character class.
- Accepts leading
. periods, e.g. .Creator.ModName.
- Accepts consecutive periods, e.g.
..Creator...ModName.
- Accepts trailing
. periods, e.g. .Creator..ModName..
- Accepts leading
_ and - characters, which is something you probably do not want either.
Generally speaking, UniqueID should probably follow .NET namespace rules, which among other notable things do not accept the - minus character in particular. If .NET namespace rules are good enough for the .NET platform then they are most probably also good enough for UniqueID. Having said that, there is also no reason to limit UniqueID to the Latin alphabet only. Please update the pattern to:
{
"pattern": "^\\p{L}[\\p{L}\\p{N}_]*(\\.[\\p{L}][\\p{L}\\p{N}_]*)*$"
}
EntryDllSMAPI/src/SMAPI.Web/wwwroot/schemas/manifest.json
Line 51 in 79f9bbb
"*/:<>?\|..dllbut not.DLLor.dLletc..character in regular expressions is a class character that denotes any character. This renders every other character in the custom[]character class ineffective in the current pattern. If you want to express a period rather than any character then you must escape it with a\backslash..period character.Please update the pattern to:
{ "pattern": "^(?!(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|(?:[Cc][Oo][Mm]|[Ll][Pp][Tt])[1-9])\\.[Dd][Ll][Ll]$)[^\\\\/:*?\"<>|]+\\.[Dd][Ll][Ll]$" }Or, if assemblies can also be put in sub-folders:
{ "pattern": "^(?!(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|(?:[Cc][Oo][Mm]|[Ll][Pp][Tt])[1-9])(?:\\\\|\\.[Dd][Ll]{2}$))(?!.*\\\\(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|(?:[Cc][Oo][Mm]|[Ll][Pp][Tt])[1-9])(?:\\\\|\\.))(?:[^\\\\/:*?\"<>|]+\\\\)*[^\\\\/:*?\"<>|]+\\.[Dd][Ll]{2}$" }UniqueID(ModIDdefinition)SMAPI/src/SMAPI.Web/wwwroot/schemas/manifest.json
Line 141 in 79f9bbb
.not being\backslash escaped in the custom[]character class..periods, e.g..Creator.ModName...Creator...ModName..periods, e.g..Creator..ModName.._and-characters, which is something you probably do not want either.Generally speaking,
UniqueIDshould probably follow .NET namespace rules, which among other notable things do not accept the-minus character in particular. If .NET namespace rules are good enough for the .NET platform then they are most probably also good enough forUniqueID. Having said that, there is also no reason to limitUniqueIDto the Latin alphabet only. Please update the pattern to:{ "pattern": "^\\p{L}[\\p{L}\\p{N}_]*(\\.[\\p{L}][\\p{L}\\p{N}_]*)*$" }