1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00
phorge-phorge/scripts
epriestley 4a53fc339e Don't use "phutil_hashes_are_identical()" to compare public keys
Summary:
Ref T13436. There's no real security value to doing this comparison, it just wards off evil "security researchers" who get upset if you ever compare two strings with a non-constant-time algorithm.

In practice, SSH public keys are pretty long, pretty public, and have pretty similar lengths. This leads to a relatively large amount of work to do constant-time comparisons on them (we frequently can't abort early after identifying differing string length).

Test Plan: Ran `bin/ssh-auth --sshd-key ...` on `secure` with ~1K keys, saw runtime drop by ~50% (~400ms to ~200ms) with `===`.

Maniphest Tasks: T13436

Differential Revision: https://secure.phabricator.com/D20875
2019-10-28 18:34:30 -07:00
..
almanac Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
cache Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
celerity Add some sort of sort to Emoji Autocomplete 2017-01-24 20:21:06 -08:00
daemon When available, use async_signals in Phabricator 2017-01-12 16:00:13 -08:00
diviner Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
drydock When bin/drydock lease is interrupted, release leases 2018-02-13 13:14:21 -08:00
fact Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
files Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
fpm Delete license headers from files 2012-11-05 11:16:51 -08:00
init When bin/drydock lease is interrupted, release leases 2018-02-13 13:14:21 -08:00
install Update install_ubuntu.sh to the new age 2018-04-21 09:57:33 -07:00
lipsum Improve bin/lipsum UX 2015-12-24 09:06:35 -08:00
mail Remove "iconv" PHP extension dependency 2019-01-30 19:46:58 -08:00
repository Add timing information for commit hooks to push logs 2018-11-08 06:00:26 -08:00
search Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
setup Replace "bin/people profileimage" with "bin/user enable|empower" 2019-08-20 17:51:14 -07:00
sql Respect user/pass flags to bin/storage for direct DatabaseRef-based queries 2016-11-19 08:39:45 -08:00
ssh Don't use "phutil_hashes_are_identical()" to compare public keys 2019-10-28 18:34:30 -07:00
symbols call qsprintf() without warnings 2019-01-14 09:41:31 -08:00
util phtize all the things 2015-05-22 21:16:39 +10:00
__init_script__.php Continue on bad database configuration from select scripts 2016-09-06 14:20:57 -07:00
manage_bulk.php Allow bulk edits to be made silently if you have CLI access 2018-01-19 13:24:54 -08:00