mirror of
https://github.com/usememos/memos.git
synced 2025-10-10 14:25:54 +08:00
fix: some fields of profile leaked without auth (#2408)
* fix some fields of profile leaked without auth * protect driver and dsn of profile
This commit is contained in:
parent
1b105db958
commit
fd5d51ee54
2 changed files with 6 additions and 3 deletions
|
@ -72,7 +72,10 @@ func (s *APIV1Service) GetSystemStatus(c echo.Context) error {
|
|||
ctx := c.Request().Context()
|
||||
|
||||
systemStatus := SystemStatus{
|
||||
Profile: *s.Profile,
|
||||
Profile: profile.Profile{
|
||||
Mode: s.Profile.Mode,
|
||||
Version: s.Profile.Version,
|
||||
},
|
||||
// Allow sign up by default.
|
||||
AllowSignUp: true,
|
||||
MaxUploadSizeMiB: 32,
|
||||
|
|
|
@ -24,10 +24,10 @@ type Profile struct {
|
|||
// Data is the data directory
|
||||
Data string `json:"-"`
|
||||
// DSN points to where memos stores its own data
|
||||
DSN string `json:"dsn"`
|
||||
DSN string `json:"-"`
|
||||
// Driver is the database driver
|
||||
// sqlite, mysql
|
||||
Driver string `json:"driver"`
|
||||
Driver string `json:"-"`
|
||||
// Version is the current version of server
|
||||
Version string `json:"version"`
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue