mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -05:00
fix remote plugin loading
This commit is contained in:
parent
eec0a21005
commit
63e1f31c21
@ -65,6 +65,6 @@ public interface IMasterApi
|
|||||||
Task<SharedLibraryCore.Localization.Layout> GetLocalization(string languageTag);
|
Task<SharedLibraryCore.Localization.Layout> GetLocalization(string languageTag);
|
||||||
|
|
||||||
[Get("/plugin_subscriptions")]
|
[Get("/plugin_subscriptions")]
|
||||||
Task<IEnumerable<PluginSubscriptionContent>> GetPluginSubscription([Query("instance_id")] Guid instanceId,
|
Task<IEnumerable<PluginSubscriptionContent>> GetPluginSubscription([Query] string instance_id,
|
||||||
[Query("subscription_id")] string subscription_id);
|
[Query] string subscription_id);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ namespace IW4MAdmin.Application.Misc
|
|||||||
var decryptedContent = new byte[encryptedContent.Length];
|
var decryptedContent = new byte[encryptedContent.Length];
|
||||||
|
|
||||||
var keyGen = new Rfc2898DeriveBytes(Encoding.UTF8.GetBytes(_appconfig.SubscriptionId), Encoding.UTF8.GetBytes(_appconfig.Id), IterationCount, HashAlgorithmName.SHA512);
|
var keyGen = new Rfc2898DeriveBytes(Encoding.UTF8.GetBytes(_appconfig.SubscriptionId), Encoding.UTF8.GetBytes(_appconfig.Id), IterationCount, HashAlgorithmName.SHA512);
|
||||||
var encryption = new AesGcm(keyGen.GetBytes(KeyLength));
|
var encryption = new AesGcm(keyGen.GetBytes(KeyLength),TagLength);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -167,7 +167,7 @@ namespace IW4MAdmin.Application.Plugin
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_pluginSubscription ??= _masterApi
|
_pluginSubscription ??= _masterApi
|
||||||
.GetPluginSubscription(Guid.Parse(_appConfig.Id), _appConfig.SubscriptionId).Result;
|
.GetPluginSubscription(_appConfig.Id, _appConfig.SubscriptionId).Result;
|
||||||
|
|
||||||
return _remoteAssemblyHandler.DecryptAssemblies(_pluginSubscription
|
return _remoteAssemblyHandler.DecryptAssemblies(_pluginSubscription
|
||||||
.Where(sub => sub.Type == PluginType.Binary).Select(sub => sub.Content).ToArray());
|
.Where(sub => sub.Type == PluginType.Binary).Select(sub => sub.Content).ToArray());
|
||||||
@ -185,7 +185,7 @@ namespace IW4MAdmin.Application.Plugin
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_pluginSubscription ??= _masterApi
|
_pluginSubscription ??= _masterApi
|
||||||
.GetPluginSubscription(Guid.Parse(_appConfig.Id), _appConfig.SubscriptionId).Result;
|
.GetPluginSubscription(_appConfig.Id, _appConfig.SubscriptionId).Result;
|
||||||
|
|
||||||
return _remoteAssemblyHandler.DecryptScripts(_pluginSubscription
|
return _remoteAssemblyHandler.DecryptScripts(_pluginSubscription
|
||||||
.Where(sub => sub.Type == PluginType.Script).Select(sub => sub.Content).ToArray());
|
.Where(sub => sub.Type == PluginType.Script).Select(sub => sub.Content).ToArray());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user