test(ui): avoid a literal em dash in the em dash check
- test(ui): avoid a literal em dash in the em dash check - fix(cli): accept any positive int64 audit count and share the last active admin rule - fix(api): limit audit before_id to 2^53-1 - fix(api): audit unmatched api requests, bound every request body and record audit write failures - fix(ui): recheck the account in the login transaction and require existing zones on zone pages - fix(api): recheck the acting admin and the stored password hash in change transactions - fix(db): keep committed outcomes on lock release failure, narrow the records contract and trace sql statements - fix(db): make the initial migration restartable and verify the application schema - fix(auth): never move last_seen_at backwards on concurrent session touches - test(api): cover lock release failure after commit and handler tracing without secrets - fix(test): redact credentials from mysql setup errors - fix(audit): retain addressed objects on admin refusals - test(db): cover migration restarts and records contract ranges in mysql - test(api): verify account races and audit rollback in mysql - fix(auth): reject password changes after account deletion - docs: document unknown api audit entries - fix(audit): bound failure retries and redact sensitive sql parameters - fix(test): isolate docker resources and cover image cli commands - test(auth): expect unauthorized after an account deletion race - fix(db): verify application column widths and foreign keys
This commit is contained in:
1 parent
5f17aab6ca
commit
53444bec7a
40 files changed
+2332
-254
No files matched your search
+5
-5
@@ -303,7 +303,7 @@ func TestUsageErrors(t *testing.T) {
|
||||
{[]string{"audit", "+5"}, "invalid audit count"},
|
||||
{[]string{"audit", "5x"}, "invalid audit count"},
|
||||
{[]string{"audit", "secretarg"}, "invalid audit count"},
|
||||
{[]string{"audit", "10000000"}, "invalid audit count"},
|
||||
{[]string{"audit", "9223372036854775808"}, "invalid audit count"},
|
||||
}
|
||||
for _, c := range cases {
|
||||
h := newCLIHarness(t, "password-on-stdin\n")
|
||||
@@ -670,7 +670,7 @@ type fakeReadBackend struct {
|
||||
rows map[string][]recordRow
|
||||
audit []auditRow
|
||||
failOn string
|
||||
auditN int
|
||||
auditN int64
|
||||
rowCalls []string
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ func (f *fakeReadBackend) ZoneRows(ctx context.Context, zone string) ([]recordRo
|
||||
return f.rows[zone], nil
|
||||
}
|
||||
|
||||
func (f *fakeReadBackend) LatestAudit(ctx context.Context, n int) ([]auditRow, error) {
|
||||
func (f *fakeReadBackend) LatestAudit(ctx context.Context, n int64) ([]auditRow, error) {
|
||||
f.auditN = n
|
||||
if f.failOn == "LatestAudit" {
|
||||
return nil, errFakeStore
|
||||
@@ -815,7 +815,7 @@ func TestAuditCommand(t *testing.T) {
|
||||
if h.stdout.String() != want {
|
||||
t.Fatalf("got\n%s\nwant\n%s", h.stdout.String(), want)
|
||||
}
|
||||
for args, n := range map[string]int{"5": 5, "0001": 1, "1000000": 1000000} {
|
||||
for args, n := range map[string]int64{"5": 5, "0001": 1, "1000000": 1000000, "1000001": 1000001, "9223372036854775807": 9223372036854775807} {
|
||||
b = &fakeReadBackend{}
|
||||
h = newCLIHarness(t, "")
|
||||
h.withReadBackend(b)
|
||||
@@ -828,7 +828,7 @@ func TestAuditCommand(t *testing.T) {
|
||||
if code := h.run("audit"); code != 1 || h.stdout.Len() != 0 {
|
||||
t.Fatal(code)
|
||||
}
|
||||
for _, args := range [][]string{{"audit", "0"}, {"audit", "-1"}, {"audit", "x"}, {"audit", "1000001"}, {"audit", "1", "2"}, {"audit", "+5"}} {
|
||||
for _, args := range [][]string{{"audit", "0"}, {"audit", "-1"}, {"audit", "x"}, {"audit", "9223372036854775808"}, {"audit", "99999999999999999999"}, {"audit", "1", "2"}, {"audit", "+5"}, {"audit", "1e3"}, {"audit", " 5"}} {
|
||||
h = newCLIHarness(t, "")
|
||||
if code := h.run(args...); code != 2 || h.prepared != 0 {
|
||||
t.Fatalf("%v: %d", args, code)
|
||||
|
||||
Reference in new issue
Block a user