wg-portal
wg-portal copied to clipboard
Invalid PrivateKey when user self-provisions via GUI
Configurations which non-admin users generate (via the GUI, clicking the button in "Open My Profile > [.../peer/create]") have their PrivateKey set to "
Configurations generated through the GUI by an admin user and configurations generated by any user via Swagger are unaffected and valid.
This is present on the latest version published on DockerHub (h44z/wg-portal:latest)
I just recently stumbled over this issue too. Thought I did something wrong. Unfortunately the self provisioning function did not go away, when setting the corresponding ENV variable.
CONFIRMED! remove line https://github.com/h44z/wg-portal/blob/e6a8e2f2cfe15dcf7d7102510fa7b08572c81f18/internal/server/handlers_peer.go#L426
Fixed now. If a user overrides the pre-set public key, the private-key will be removed (as it is not known). Otherwise the private key will stay in the configuration.