- edited description
ANSI plugin causes malformed data to be inserted into Registry
Issue #1
new
Environment
- Windows 7 Pro SP1 x64
- Windows Server 2012 R2 Standard x64
- MakeNSIS v3.0b1
- liteFirewall 1.0 (2011-07)
Steps to reproduce
- Download
Sample.nsi
from the plugin installation ZIP. - You can use either
liteFirewall.dll
orliteFirewallW.dll
and it won't affect the results. - If you want, set
Unicode false
in the NSI to forcex86-ansi
output (it defaults tofalse
anyway, but this lets you try both modes easily) -
Add a firewall rule:
liteFirewall::AddRule "$WINDIR\Notepad.exe" "liteFirewall Test"
or
liteFirewallW::AddRule "$WINDIR\Notepad.exe" "liteFirewall Test"
-
Check the created rule in the Registry (
HKLM\System\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\FirewallRules\
) or Windows Firewall with Advanced Security (wf.msc
)
Expected results
- The value of
Unicode
should not affect the results - A new firewall rule should have been created
- Name =
liteFirewall Test
- Program =
C:\Windows\Notepad.exe
- Full Registry entry =
v2.10|Action=Allow|Active=TRUE|Dir=In|Profile=Private|App=C:\Windows\Notepad.exe|Name=liteFirewall Test|
Actual results
- Expected results occur when
Unicode true
is set - When
Unicode false
is set,- A new firewall rule is created
- Name =
楬整楆敲慷汬吠獥t
- Program =
㩃坜湩潤獷乜瑯灥摡攮數
- Full Registry entry =
v2.10|Action=Allow|Active=TRUE|Dir=In|Profile=Private|App=㩃坜湩潤獷乜瑯灥摡攮數|Name=楬整楆敲慷汬吠獥t|
Note: The actual Name and Program are also what you get if you encode the expected Name and Program with ANSI and then decode it with UTF-16.
Comments (3)
-
reporter -
repo owner This seems an encoding issue. I strongly suggest you use the Unicode version (liteFirewallW.dll) with
Unicode true
. -
repo owner @aldaviva Have you tried this https://bitbucket.org/jeffio/litefirewall/commits/e013c676352a0b2e47dfd2db8dd7c69288b38dec?
- Log in to comment