Repository navigation
fix: close the phone verification leftovers - #734
Merged
Merged
Conversation
- account service: phone/start and age/start mint stateless nonces (start-nonces.js) that carry their own expiry under a per-process HMAC; only spent nonces are kept, in a table sized from the global token bucket that refuses when full instead of evicting - phone limits: the member, number, pending and resend tables are sized from the daily ceiling and never evict a live entry; when full, a send answers limite-telefone before the provider call; a pending entry leaves memory when its code expires, on its own timer and on start - phone.json v2: a cleared map records when the sweep saw a member under no block after its bloquear reports, so a member unblocked before Excluir conta keeps no burn from the lifted block; held() counts every change still waiting for the operator, the deletion's own block included, so a report decided after the deletion, or while a failed one waits, still burns; a deletion with block reports waits when the phone sweep fails - app: Trocar o celular compares the proof dates before and after and says whether the number changed; the row shows only for an unlocked passkey account behind an open phone gate - docs: protocol, design (accepted limits), README, changelog and verification fragments Closes #534
64 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que muda e por quê
Fecha as sobras da verificação de celular listadas na #534.
/account/phone/starte/account/age/startemitem códigos de início sem estado (start-nonces.js): o código traz a própria validade e um HMAC do processo. Só os códigos já usados ficam guardados, numa tabela dimensionada pelo balde global (VARANDA_ACCOUNT_RATEe rajada, nunca abaixo de 16384) que recusa quando enche em vez de apagar o mais antigo.4 x VARANDA_PHONE_DAILY_LIMITe nunca apagam uma entrada valendo. Cheias, o envio recusa comlimite-telefoneantes do Didit e o registro mostratabela-cheia. O número de um envio pendente sai da memória quando o código vence.phone.jsonversão 2, com o mapacleared: um membro desbloqueado que depois exclui a conta não tem o número preso de novo pelas denúncias do bloqueio desfeito (decisão do dono). Uma denúncia decidida depois da exclusão, ou enquanto uma exclusão que falhou espera, continua prendendo o número. Se a varredura falhar durante Excluir conta, a exclusão de um membro bloqueado ou com denúncias de bloqueio espera (indisponivel). Um arquivo da versão 1 ainda abre; depois da primeira gravação na 2, um serviço anterior não abre mais o arquivo.docs/protocol.md,docs/design.md(limites aceitos pelo dono por escrito: o número em memória por até 10 minutos e o passo desligado sem política nem atestado), README, changelog e verificação.Issue
Closes #534
Como verificar
Passos e resultados em
docs/verification/fix-phone-verification-leftovers.md. Cada correção tem teste que falha sem ela (conferido revertendo).Web conferida no laboratório hospedado (cadastro com celular, "Trocar o celular" com o mesmo número e com outro). Android e iOS abrem sem erro com o JS da branch; o fluxo com conta no app nativo não é alcançável no build de debug e foi para a #224, junto com o backup do
phone.jsonantes do deploy e os formulários de privacidade das lojas.Checklist
npm run lint,npm test(ounpm test -- --affected=origin/main) enpm run demopassamdocs/changelog/<branch>.mde verificação emdocs/verification/<branch>.md, se houver, sem editar o CHANGELOG.md nem acrescentar seção ao docs/verification.md