Skip to content

Open the real dnevnik2 once, with a real account #121

Open

Description

@lumenpearson

The real Petersburg diary has never been opened, by anybody, at any point in this project. Everything in providers/petersburg/ is written against the shape the upstream is documented to have.

That is not a small caveat. It is the reason for one of this project's oddest-looking decisions: a 200 of HTML from the sign-in never hands the ticket back. A login form on Yii refuses a password with the same bytes a captcha arrives in, and from here the two are indistinguishable — so the page says «дневник ответил непонятно» rather than blaming the password. Once somebody has actually signed in, that ambiguity may turn out to be resolvable, and the page could say something truer.

What one real session would settle:

  • whether the sign-in works at all, and what an actual wrong password looks like versus a captcha;
  • whether the mapper's assumptions hold: a lesson's time when the upstream answers in ISO, and a child in a single-child account — both were defects found by reading and fixed without ever seeing the real answer;
  • what a real quarter boundary looks like, and whether «current quarter» read on the diary's clock rather than the server's is right in practice;
  • whether corrections over real data read the way they are meant to — nobody has made one on a screen either.

Handle the credential carefully: DIARY_SECRET seals the upstream session token with Fernet because it is replayed on every call and cannot be a hash. Do not put a real account's password anywhere in this repository, in an issue, or in a log — the whole point of /diary/signin is that a password typed into a Telegram chat stays in the chat history, on Telegram's servers and in that phone's backup.

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions