Issue #4206 - Firewall port list or range not possible #132

Merged
merged 2 commits into from Feb 14, 2015

Projects

None yet

3 participants

@NorbertHD
Contributor

Change of (i)Port variable from integer to string is necessary to handle port ranges and lists. All the other port specific code already uses strings.

@NorbertHD NorbertHD Issue #4206 - Firewall port list or range not possible
Change of (i)Port variable from integer to string is necessary to handle port ranges and lists. All the other port specific code already uses strings.
ae40645
@robmen
Member
robmen commented Jan 4, 2015

Is there no validation we should be doing? Is any string valid?

@NorbertHD
Contributor

Any number between 1 and 65535 is valid or any range by these numbers seperated by hyphen or any combination of these seperated by comma.
Is validation necessary? I have only seen this validation where only specific words are allowed.

E.g. registry extension doesn't check the parameters.
Also the current firewall port code doesn't check if the number is between 1 and 65535.

@barnson barnson commented on the diff Jan 30, 2015
src/ext/FirewallExtension/ca/firewall.cpp
@@ -39,7 +39,7 @@ static UINT SchedFirewallExceptions(
LPWSTR pwzCustomActionData = NULL;
LPWSTR pwzName = NULL;
LPWSTR pwzRemoteAddresses = NULL;
- int iPort = 0;
+ LPWSTR pwzPort = NULL;
@barnson
barnson Jan 30, 2015 Member

Needs a matching call to ReleaseStr at LExit.

Have you signed an assignment agreement? We'll need that. See http://wixtoolset.org/development/assignment-agreement/ for details.

@NorbertHD
NorbertHD Feb 1, 2015 Contributor

I have added the missing ReleaseStr and have signed the agreement on January 9. But I have not enough WiX programming knowledge/skills to program the parameter validation.

@barnson barnson merged commit d5faaac into wixtoolset:develop Feb 14, 2015
@barnson
Member
barnson commented Feb 14, 2015

Thanks!

@wixbot wixbot referenced this pull request in wixtoolset/issues Dec 20, 2015
Closed

Firewall port list or range not possible #4206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment