<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Em qua, 12 de set de 2018 às 04:23, Flitter, Lars <<a href="mailto:password-store@larsflitter.de">password-store@larsflitter.de</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">this way you allow to pass generate a .gpg file that pass will
      never be able to read again. <br></div></blockquote><div><br></div><div>I only used 'pass generate' as an example to reproduced this bug. I sincerely don't know how a .gpg file was created in ~/.password-store. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
    
    <p><br>
    </p>
    <p>Instead of fixing the symptom I suggest to fix the cause: Change
      generate to not create .gpg files without a basename.<br></p></div></blockquote>Indeed  a .gpg file in ~/.password-store is not usual. But something unprevisible happened and I think the software should be 'fault tolerant', reacting normally when abnormality happen. If I knew all the situations that created this unused file, I could securily fix only the cause(s). So, 'fix the symptom' seems not to be a bad idea, I think.</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
    Cheers,<br>
    Lars<br>
    <br>
    <div class="gmail-m_-1849318596903033855moz-cite-prefix">On 12.09.2018 03:45, Marcelo Akira
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div>Hi,</div>
                  <div><br>
                  </div>
                  <div>I accidentally created an unused file .gpg at
                    password-store path and since command 'pass list'
                    not worked anymore.<br>
                  </div>
                  <div><br>
                  </div>
                  <div>You can reproduce this bug with this commands:<br>
                  </div>
                  <div><br>
                  </div>
                  <div>$ pass generate ''</div>
                  <div>The generated password for  is:<br>
                    hE+>?(yHpYah2EIH\D2,j=z&t<br>
                  </div>
                  <div>$ ls -la ~/.password-store/.gpg<br>
                    -rw------- 1 akira akira 348 set 11 22:32
                    /home/akira/.password-store/.gpg<br>
                  </div>
                  <div>$ pass list</div>
                  <div>hE+>?(yHpYah2EIH\D2,j=z&t</div>
                  <div><br>
                  </div>
                  <div>To prevent this, pass could ignore the file
                    (~/.password-store/.gpg):</div>
                  <div><br>
                  </div>
                  <div>diff --git a/src/password-store.sh
                    b/src/password-store.sh<br>
                    index d89d455..3fac380 100755<br>
                    --- a/src/password-store.sh<br>
                    +++ b/src/password-store.sh<br>
                    @@ -363,7 +363,7 @@ cmd_show() {<br>
                            local path="$1"<br>
                            local passfile="$PREFIX/$path.gpg"<br>
                            check_sneaky_paths "$path"<br>
                    -       if [[ -f $passfile ]]; then<br>
                    +       if [[ -f $passfile ]] && ! [[ -z
                    $path ]]; then<br>
                                    if [[ $clip -eq 0 && $qrcode
                    -eq 0 ]]; then<br>
                                            pass="$($GPG -d
                    "${GPG_OPTS[@]}" "$passfile" | $BASE64)" || exit $?<br>
                                            echo "$pass" | $BASE64 -d<br>
                    <br>
                  </div>
                  <div>Thanks,<br>
                  </div>
                  <div>-- <br>
                    <div dir="ltr" class="gmail-m_-1849318596903033855gmail_signature">
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">Marcelo Akira Inuzuka<br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="gmail-m_-1849318596903033855mimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
Password-Store mailing list
<a class="gmail-m_-1849318596903033855moz-txt-link-abbreviated" href="mailto:Password-Store@lists.zx2c4.com" target="_blank">Password-Store@lists.zx2c4.com</a>
<a class="gmail-m_-1849318596903033855moz-txt-link-freetext" href="https://lists.zx2c4.com/mailman/listinfo/password-store" target="_blank">https://lists.zx2c4.com/mailman/listinfo/password-store</a>
</pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>
Password-Store mailing list<br>
<a href="mailto:Password-Store@lists.zx2c4.com" target="_blank">Password-Store@lists.zx2c4.com</a><br>
<a href="https://lists.zx2c4.com/mailman/listinfo/password-store" rel="noreferrer" target="_blank">https://lists.zx2c4.com/mailman/listinfo/password-store</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Marcelo Akira Inuzuka<br></div></div></div></div></div></div>