update to expiring cookies
This commit is contained in:
parent
341b03b8f0
commit
53fe945f29
2
go.mod
2
go.mod
|
@ -7,7 +7,7 @@ require (
|
|||
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859
|
||||
humungus.tedunangst.com/r/go-sqlite3 v1.1.3
|
||||
humungus.tedunangst.com/r/webs v0.6.14
|
||||
humungus.tedunangst.com/r/webs v0.6.15
|
||||
)
|
||||
|
||||
go 1.11
|
||||
|
|
8
go.sum
8
go.sum
|
@ -21,9 +21,5 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI=
|
||||
humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M=
|
||||
humungus.tedunangst.com/r/webs v0.6.12 h1:tRQOF/tJ6FeT3V1KO+8iz+WFNwMQvzMmPqiykD0rgnA=
|
||||
humungus.tedunangst.com/r/webs v0.6.12/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
|
||||
humungus.tedunangst.com/r/webs v0.6.13 h1:NoPvn+92GVCmMekUCyfgT9rSgDQs6Jp5Fv/tyhHD1Gc=
|
||||
humungus.tedunangst.com/r/webs v0.6.13/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
|
||||
humungus.tedunangst.com/r/webs v0.6.14 h1:R7UxnmXSw3MN/FMQgCR/Gzn84lOIJ6tnIjgmreApwLo=
|
||||
humungus.tedunangst.com/r/webs v0.6.14/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
|
||||
humungus.tedunangst.com/r/webs v0.6.15 h1:TrUtO0/DdcomAMs6A1S4asx1QjYjOgj6ykuiLbF1qzo=
|
||||
humungus.tedunangst.com/r/webs v0.6.15/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
var myVersion = 25
|
||||
var myVersion = 26
|
||||
|
||||
func doordie(db *sql.DB, s string, args ...interface{}) {
|
||||
_, err := db.Exec(s, args...)
|
||||
|
@ -275,6 +275,12 @@ func upgradedb() {
|
|||
doordie(db, "update config set value = 25 where key = 'dbversion'")
|
||||
fallthrough
|
||||
case 25:
|
||||
doordie(db, "delete from auth")
|
||||
doordie(db, "alter table auth add column expiry text")
|
||||
doordie(db, "update config set value = 26 where key = 'dbversion'")
|
||||
fallthrough
|
||||
case 26:
|
||||
|
||||
default:
|
||||
log.Fatalf("can't upgrade unknown version %d", dbversion)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue