mirror of
https://codeberg.org/scip/ephemerup.git
synced 2025-12-17 04:30:57 +01:00
Changes:
- had to add a Type field to interface DbEntry so that db.List() is able to distinguish between Upload and Form properly. - added form describe and delete commands - added --query parameter to form+upload list for filtering
This commit is contained in:
@@ -73,8 +73,10 @@ type Config struct {
|
||||
RegKey *regexp.Regexp
|
||||
RegEmail *regexp.Regexp
|
||||
RegText *regexp.Regexp
|
||||
CleanInterval time.Duration
|
||||
DefaultExpire int
|
||||
RegQuery *regexp.Regexp
|
||||
|
||||
CleanInterval time.Duration
|
||||
DefaultExpire int
|
||||
}
|
||||
|
||||
func Getversion() string {
|
||||
@@ -120,7 +122,8 @@ func (c *Config) ApplyDefaults() {
|
||||
c.RegDuration = regexp.MustCompile(`[^dhms0-9]`)
|
||||
c.RegKey = regexp.MustCompile(`[^a-zA-Z0-9\-]`)
|
||||
c.RegEmail = regexp.MustCompile(`[^a-zA-Z0-9._%+\-@0-9]`)
|
||||
c.RegText = regexp.MustCompile(`[^a-zA-Z0-9._%+\-@0-9 #/\.]`)
|
||||
c.RegText = regexp.MustCompile(`[^a-zA-Z0-9_%+\-@0-9 #/\.]`)
|
||||
c.RegQuery = regexp.MustCompile(`[^a-zA-Z0-9_%+\-@0-9 #/\.\*\[\]\(\)\\]`)
|
||||
|
||||
c.CleanInterval = 10 * time.Second
|
||||
c.DefaultExpire = 30 * 86400 // 1 month
|
||||
|
||||
Reference in New Issue
Block a user