You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Settings are read in many places, and a bad value is handled four different ways #301
src/routes/docs.rs:112 reads PUBLIC_URL although state.public_url exists. PUBLIC_URL is read in five places.
Config::from_lookup takes a lookup it can be tested with, then calls prices::PriceTable::from_env(), which reads the real environment (src/main.rs:286).
A value that does not parse is:
fatal for BIND, SIGNUP, MIN_AGE, AI_PRICES
warned about and defaulted for LOG
silently defaulted for COURSE_BYTES, COURSE_BYTES_PER_USER, COURSES_PER_USER, RETAIN_HISTORY_DAYS, AI_TIMEOUT_SECS, AI_JOB_BUDGET_SECS
silently off for booleans: v == "1" || v == "true" is written 5 times, so SKRONGLE_SECURE_COOKIES=yes is off without a word
The last one is a security setting a self-hoster believes they turned on.
Fix, one PR: parse every setting in Config::from_lookup with one rule (a bad value stops the start and names the variable). Put the AI timeouts, the private-URL flag, retention and the base URLs in AppState. skrongle doctor prints from the same struct.
Also here: signup::MIN_AGE is a OnceLock set from main although signup: Mode is in AppState; and static CALLS: Slots (src/tutor.rs:732) holds the two tutor slots for the whole process while tutor::Sessions is in AppState, so every router test in one binary shares them. Move both into AppState.
From the code review of 24 November 2026. Line numbers are as of 0.5.0 (2547b36).
Activity