1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00
phorge-phorge/src
epriestley 3dea92081b Fix an issue where passphrase-protected private keys were stored without discarding passphrases
Summary:
Ref T13454. See <https://discourse.phabricator-community.org/t/newly-created-ssh-private-keys-with-passphrase-not-working-anymore/3883>.

After changes to distinguish between invalid and passphrase-protected keys, SSH private key management code incorrectly uses "-y ..." ("print public key") when it means "-p ..." ("modify input file, removing passphrase"). This results in the command having no effect, and Passphrase stores the raw input credential, not the stripped version.

We can't recover the keys because we don't store the passphrase, so no migration here is really possible. (We could add more code to detect this case, but it's presumably rare.)

Also, correct the behavior of the "Show Public Key" action: this is available for users who can see the credential and does not require edit permission.

Test Plan:
  - Created a new credential with a passphrase, then showed the public key.

Maniphest Tasks: T13006, T13454

Differential Revision: https://secure.phabricator.com/D21245
2020-05-13 08:14:37 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront When proxying HTTP repository responses from repository nodes, discard content description headers 2020-04-25 07:51:46 -07:00
applications Fix an issue where passphrase-protected private keys were stored without discarding passphrases 2020-05-13 08:14:37 -07:00
docs Add "short name", "id", and "phid" variables for external editor URIs 2020-04-19 09:37:53 -07:00
extensions
infrastructure Render proper "Show Context" links in DocumentEngine diffs, not just bullets 2020-05-12 16:09:22 -07:00
view Restore highlighting when jumping to transactions using URI anchors 2020-05-04 10:04:04 -07:00
__phutil_library_init__.php
__phutil_library_map__.php Remove "DifferentialInlineCommentQuery" 2020-05-07 16:07:55 -07:00