Repository navigation
fix(tidy): saída de comando no log deixa de passar por mensagem digitada - #26
Merged
Merged
Conversation
- O maintain lia a saída de um comando ! (<bash-stdout>NOME=valor</bash-stdout>) como mensagem do usuário e tomava o bloco inteiro como o segredo "completo", trocando o valor certo no .env por texto com marcação - userMessage corta a saída de comando e o texto que não foi digitado (stripNotTyped do hook); o comando em <bash-input> continua - Testes no tidy.test.js: o valor só impresso não acha mensagem, e o mesmo valor digitado é achado inteiro Autor: Leonardo Candiani
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.
Em 16/10 o
keyfence maintain --applytrocou o valor dePAINEL_ADMIN_CHAVEem~/.config/keyfence/secrets.env(32 caracteres) por um texto de 105 caracteres: o valor antigo embrulhado em<bash-stdout>PAINEL_ADMIN_CHAVE=...</bash-stdout><bash-stderr>. A causa étidy.messagesWithcompieces, que lê o log cru: a saída de um comando!fica gravada como mensagem do usuário, e o bloco inteiro passava por "segredo inteiro" no reparo denaming.nameOld. O valor já foi restaurado do backup.Mudança:
userMessage(src/tidy.js) corta<bash-stdout>,<bash-stderr>e<local-command-*>, e aplica ostripNotTypeddo hook. O comando digitado (<bash-input>) continua.Prova: sem o conserto, o teste novo falha em 2 de 22 (o valor é achado na saída do comando, e a mensagem digitada perde para ela). Com o conserto, 22/22, e
npm testsai com 0.Autor: Leonardo Candiani