mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-03 13:11:46 +08:00
improve (crypto): derivate secret_key for each usage to reduce attack surface in the worst case scenario
This commit is contained in:
@ -15,7 +15,6 @@ import (
|
||||
var (
|
||||
Config Configuration
|
||||
configPath string = filepath.Join(GetCurrentDir(), CONFIG_PATH + "config.json")
|
||||
SECRET_KEY string
|
||||
)
|
||||
|
||||
type Configuration struct {
|
||||
@ -321,7 +320,7 @@ func (this *Configuration) Initialise() {
|
||||
}
|
||||
this.Save()
|
||||
}
|
||||
SECRET_KEY = this.Get("general.secret_key").String()
|
||||
InitSecretDerivate(this.Get("general.secret_key").String())
|
||||
}
|
||||
|
||||
func (this Configuration) Save() Configuration {
|
||||
|
||||
Reference in New Issue
Block a user