Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/apps/api
diff options
context:
space:
mode:
authorLeitwolf112026-11-06 02:45:48 +0300
committerLeitwolf112026-11-06 02:45:48 +0300
commit4dbeff2eea0fd2e0ad4c6da3d41f902dcdcf50ce (patch)
tree357ed1d6650f9589c9d6f53d4ba9a7d27981e434 /apps/api
parent4a00a68309a3605dafedbc522569fc1b2c8aca1e (diff)
downloadprogmaweb-feature/plugin-identity-from-command.tar.gz
Anchor the identity patterns at the end of the textfeature/plugin-identity-from-command
In .NET, $ also matches before a final line break, so a name or version ending in one passed the check and was kept with it, giving a catalog entry and a JAR path the public route never matches. The patterns end in \z.
Diffstat (limited to 'apps/api')
-rw-r--r--apps/api/ViGet/TazelPluginDescriptor.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/api/ViGet/TazelPluginDescriptor.cs b/apps/api/ViGet/TazelPluginDescriptor.cs
index 7cf3ca1..6fb4eb8 100644
--- a/apps/api/ViGet/TazelPluginDescriptor.cs
+++ b/apps/api/ViGet/TazelPluginDescriptor.cs
@@ -140,11 +140,11 @@ internal sealed partial record TazelPluginDescriptor(
/// <summary>One identifier: a letter or <c>_</c>, then letters, digits or <c>_</c>.</summary>
/// <returns>The compiled expression.</returns>
- [GeneratedRegex("^[A-Za-z_][A-Za-z0-9_]*$")]
+ [GeneratedRegex(@"^[A-Za-z_][A-Za-z0-9_]*\z")]
private static partial Regex IdentifierPattern();
/// <summary>An exact version of three to five numbers without leading zeros, as Tazel accepts it.</summary>
/// <returns>The compiled expression.</returns>
- [GeneratedRegex(@"^(?:0|[1-9][0-9]*)(?:\.(?:0|[1-9][0-9]*)){2,4}(?:-[0-9A-Za-z.-]+)?$")]
+ [GeneratedRegex(@"^(?:0|[1-9][0-9]*)(?:\.(?:0|[1-9][0-9]*)){2,4}(?:-[0-9A-Za-z.-]+)?\z")]
private static partial Regex VersionPattern();
}