mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 03:52:57 +00:00
Add validation for empty plugin ID and server URL
This commit is contained in:
parent
6979a73e5c
commit
650a27fed1
@ -7,6 +7,9 @@ public static partial class PluginFactory
|
|||||||
{
|
{
|
||||||
public static async Task<EntityTagHeaderValue?> DetermineConfigPluginETagAsync(Guid configPlugId, string configServerUrl, CancellationToken cancellationToken = default)
|
public static async Task<EntityTagHeaderValue?> DetermineConfigPluginETagAsync(Guid configPlugId, string configServerUrl, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
|
if(configPlugId == Guid.Empty || string.IsNullOrWhiteSpace(configServerUrl))
|
||||||
|
return null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var serverUrl = configServerUrl.EndsWith('/') ? configServerUrl[..^1] : configServerUrl;
|
var serverUrl = configServerUrl.EndsWith('/') ? configServerUrl[..^1] : configServerUrl;
|
||||||
|
Loading…
Reference in New Issue
Block a user