Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP port are from 1 to 65535 and not from 1 to 65335 #13

Closed
mvalo opened this issue May 21, 2015 · 3 comments · Fixed by #14
Closed

TCP port are from 1 to 65535 and not from 1 to 65335 #13

mvalo opened this issue May 21, 2015 · 3 comments · Fixed by #14
Labels

Comments

@mvalo
Copy link

mvalo commented May 21, 2015

Hi,
In your regexp, you test if the port is contained in [1..65335].
But TCP ports are going until 65535.

Issue in on file "proxy-protocol.regexp.js".

Before :
Port = '([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-2][0-9]{2}|653[0-2][0-9]|6533[0-5])'; // 1..65335

After correction of your regexp :
Port = '([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-3][0-9]|6553[0-5])'; // 1..65535

@cusspvz
Copy link
Member

cusspvz commented May 22, 2015

@mvalo 0.3.10 release already contains your contributions! Thanks once again! :)

@mcullmann
Copy link

Hi,

I find accidentally this entry and realized there is a little mistake in the pattern:

"After correction of your regexp :
Port = '([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-3][0-9]|6553[0-5])'; // 1..65535"

This Pattern is allowed for the range between 1-65539, it should be:
Port = '([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'; // 1..65535

@cusspvz
Copy link
Member

cusspvz commented Jan 11, 2018

@mcullmann thanks for your comment!

I believe that's the Pattern we have at the latest version:
https://github.com/findhit/proxywrap/blob/master/lib/proxy-protocol.regexp.js#L85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants