ravahn/FFXIV_ACT_Plugin

Repair Firewall Rule button falsely returns success in UI

bryonadams opened this issue · 0 comments

While not running ACT as an adminstrator, clicking the "Repair Firewall Rule" button under Plugins > FFXIV ACT Plugin, the UI pops up stating with a message that indicates a success; "Advanced Compat Tracker Firewall rule removed and re-added," but the log message with debugs enables indicates it failed.

[19:52:06.872] FFXIV_ACT_Plugin Version: 2.6.8.1 (50BCD605C50A749F)
... <snip>
[20:03:54.920] Error updating firewall.  System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))    at WindowsFirewallHelper.COMInterop.INetFwRules.Remove(String name)    at WindowsFirewallHelper.FirewallAPIv2.Firewall.RulesOnItemsModified(Object sender, ActiveCollectionChangedEventArgs`1 e)    at System.Collections.ObjectModel.Collection`1.Remove(T item)    at FFXIV_ACT_Plugin.Network.FirewallManager.FixFirewallRules()

Viewing the inbound firewall rules on Windows confirms that the rule is not added/fixed if the rule is removed before testing.

Interestingly, running ACT as admin causes no debug log to be printed but it does work.

Should the plugin respond indicating a success in the UI even though it detects it failed to edit the firewall rule?