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

Increase max size of management password buffer #568

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

selvanair
Copy link
Collaborator

As we now allow users to set a management password (for persistent connections), the max size of password should match what openvpn.exe can handle (128 or 4096 bytes depending on build options).

Increase the buffer size to 4096 though such large passwords may not work in practice. 127 bytes + NUL, may be a safe upper limit.

For the random password used for connections spawned by the GUI, the current size of 15 bytes + NUL is retained.

Fixes: #567
Signed-off-by: Selva Nair selva.nair@gmail.com

As we now allow users to set a management password (for persistent
connections), the max size of password should match what openvpn.exe
can handle (128 or 4096 bytes depending on build options).

Increase the buffer size to 4096 though such large passwords
may not work in practice. 127 bytes + NUL, may be a safe upper limit.

For the random password used for connections spawned by the GUI,
the current size of 15 bytes + NUL is retained.

Fixes: OpenVPN#567
Signed-off-by: Selva Nair <selva.nair@gmail.com>
@selvanair selvanair merged commit 8b1976c into OpenVPN:master Dec 22, 2022
@selvanair selvanair deleted the mgmt-pass-len branch December 22, 2022 21:06
@gitnewcomer
Copy link

@selvanair how can I test the fix? I have tried the files from artifacts (openvpn-gui_x64_ossl3.zip) and got an error that the function OPENSSL_strcasecmp was not found on libssl-3-x64.dll. Prior I have installed OpenVPN 2.6 Beta2.
Is there a new MSI with the fix I could test?
Thanks!

@lstipakov
Copy link
Member

lstipakov commented Dec 23, 2022

Looks like artifacts use OpenSSL 3.0.2 and 2.6beta uses 3.0.7. Let me fix the artifacts building.

@lstipakov
Copy link
Member

@gitnewcomer Could you try artifacts from https://github.com/lstipakov/openvpn-gui/actions/runs/3764681539 ? This is based on master + openssl version bump.

@gitnewcomer
Copy link

@gitnewcomer Could you try artifacts from https://github.com/lstipakov/openvpn-gui/actions/runs/3764681539 ? This is based on master + openssl version bump.

Thanks @lstipakov, it works now! :)
Do you know when would be released a new MSI package with this fix?
Just another quick question: when we choose to install the PLAP on the installer, wouldn't it be better to activate the automatic startup of the OpenVPNService? This would allow a quicker deploy on many clients, because after copying the ovpn profile and password file to the config-auto, the PLAP would activate automatically on reboot.
Thanks again for all the work you all have done! I wish you all a Merry Christmas! :)

@lstipakov
Copy link
Member

We should have beta3 / rc1 before the end of year.

Yes I agree, it makes sense to auto-start the service for clean install, should be fixed in OpenVPN/openvpn-build#308.

@selvanair
Copy link
Collaborator Author

I suggest to change the way we activate the service install feature. Always install the service and plap binaries, but leave the service feature in the installer unselected by default. Then enabling the service feature during install would mean that service is started (and set to auto-start) even on fresh install, choosing PLAP activation would imply service start.

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

Successfully merging this pull request may close these issues.

Silent failure of PLAP on adding management password
3 participants