Skip to content
Snippets Groups Projects
  1. Apr 16, 2014
  2. Apr 15, 2014
  3. Apr 14, 2014
  4. Apr 12, 2014
    • Jason A. Donenfeld's avatar
      Use pipefail and randomize intermediate encrypted. · 2eaca825
      Jason A. Donenfeld authored
      
      Matthew writes:
      
          If the initial decrypt fails then the rest of the line shouldn't
          continue, as it won't be a properly decrypted password being
          re-encrypted and written over the existing passfile.
      
          One solution to this would be to enable pipefail (set -o pipefail) -
          either just before, or at the start of this script.  This would
          cause the failure of any of the commands in a pipe to set the return
          status of the whole pipeline to non-zero (the last failed command's
          return code is used).
      
      We take his suggestion with this patch. While we're at it, we take a
      little bit extra care (though not too much extra care) to select a more
      random intermediate password, in case folks have a strange habit of
      using a dot-new extension on files.
      
      Suggested-by: default avatarMatthew Richardson <m.richardson@ed.ac.uk>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
  5. Apr 05, 2014
  6. Mar 23, 2014
  7. Mar 22, 2014
  8. Mar 20, 2014
  9. Mar 19, 2014
  10. Sep 14, 2013
  11. May 22, 2013
  12. Apr 04, 2013
  13. Feb 23, 2013
  14. Oct 18, 2012
  15. Oct 16, 2012
    • guns's avatar
      Do not interpret backslashes when reading passwords · 8c46958d
      guns authored
      The `read` builtin accepts backslash notation for common non-printing
      characters by default, like `\t` and `\n`. This requires that any
      literal backslashes must also be escaped as `\\`.
      
      Given that `gpg -e` does not interpret input, the `read` invocations are
      changed to do the same.
      
      Also, the right hand side of an `==` comparison within `[[ ]]` must be
      quoted in order to suppress pattern metacharacter expansion. Quoting the
      bash manual:
      
          When the == and != operators are used, the string to the right of
          the operator is considered a pattern and matched according to the
          rules described below under Pattern Matching.
      8c46958d
Loading