Every time in UTC, and every day as YYYY-MM-DD (closes #313)
check / check (push) Waiting to run
check / check (push) Waiting to run
Every time the program stores, logs or compares is in UTC, whatever TZ says, and AbuseIPDB's day in `reputation.json` is a `YYYY-MM-DD` date. Times read from a state file are converted to UTC as they are read, so a file is written back with `Z` times only. A test runs `sww waf` with `TZ=Pacific/Kiritimati` and checks the process line, the request line and `clients.json`. `SPEC.md` states the rule and `AGENTS.md` makes it an iron rule. - The rate limit's `day` and `day_bytes` buckets keep a start time: each is a 24-hour bucket begun at an instant, not a calendar day. - New dependency `cloud.google.com/go`, of which only `civil` is built. - No migration: a `reputation.json` holding the old day form fails to load, naming the file. Model: opus-5-5
This commit was merged in pull request #317.
This commit is contained in:
1 parent
f7e3190654
commit
9bcbe5a3c8
11 files changed
+256
-22
No files matched your search
@@ -12,6 +12,10 @@ it is built, except what the last section lists. `README.md` says how to run it.
|
||||
under `docs/` give the settings, the formats and the lists. This document links
|
||||
to them.
|
||||
|
||||
The whole application stores, logs and handles every time in UTC, whatever `TZ`
|
||||
or the host's time zone says. It keeps every day as a date written `YYYY-MM-DD`,
|
||||
never as a time.
|
||||
|
||||
## Purpose
|
||||
|
||||
- It protects self-hosted apps on the open internet from scrapers, scanners and
|
||||
@@ -1775,6 +1779,7 @@ in. `docs/state-files.md` lists the files, what each holds, and their sizes.
|
||||
- a top-level `version` number;
|
||||
- entries sorted by client address;
|
||||
- times in RFC 3339 UTC;
|
||||
- days as `YYYY-MM-DD`;
|
||||
- durations and sizes as plain numbers, with the unit in the field name.
|
||||
- `bans.json`, `reputation.json` and `alerts.json` are indented, so that a
|
||||
person can open `bans.json` in an editor, find an address, and remove or add
|
||||
|
||||
Reference in new issue
Block a user