h44z / wg-portal

WireGuard Configuration Portal with LDAP connection
https://wgportal.org/
MIT License
933 stars 127 forks source link

Fix: Password storage issue with PostgreSQL backend #231

Closed ReeseWang closed 6 months ago

ReeseWang commented 6 months ago

Description

This pull request addresses an issue where the password field of the User struct was being stored as an empty string in the PostgreSQL database, while working correctly with the SQLite backend (not sure why). The issue was caused by the custom MarshalJSON and String methods defined on the PrivateString type, which always returned an empty string.

Changes

Testing

h44z commented 6 months ago

thanks