summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2018-07-05 15:20:05 -0400
committerBjörn Esser <besser82@fedoraproject.org>2018-07-09 00:34:06 +0200
commita7f9df50cecec46bb8176382faa685ce35ca72be (patch)
tree733c3bdd04b182152a1b58eb0d97016ca01235e1 /.gitignore
parenta33d95ea613256c46f0b05fa2345080d47193c9e (diff)
downloadlibxcrypt-a7f9df50cecec46bb8176382faa685ce35ca72be.tar.gz
libxcrypt-a7f9df50cecec46bb8176382faa685ce35ca72be.tar.bz2
libxcrypt-a7f9df50cecec46bb8176382faa685ce35ca72be.zip
Make salt validation pickier.
This started out as a patch to fold together test-crypt-badsalt.c and test-crypt-nonnull.c (which were almost the same program) and extend their testing from DES to all of the supported hashes. That revealed that many of the supported hash functions do not validate the contents of their salt strings very carefully. This patch has a low but nonzero backward compatibility risk, because now we reject certain calls to crypt*() that we would previously have accepted. In particular, setting strings of the form $5$xxxxxxx*xxxxxxxx$ where x stands for any "itoa64" character and * for any non-"itoa64" character, would formerly be accepted but are now rejected. Some of the hash algorithms that were lenient about the contents of the salt would echo back the salt verbatim, and others would convert it to the base64 alphabet somehow. I think it's unlikely that this occurs in real password files but I don't have a lot of data to base that on.
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore3
1 files changed, 1 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 9f443bd..bb7f15c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,13 +53,12 @@
/test-alg-sha1
/test-alg-sha256
/test-alg-sha512
+/test-badsalt
/test-bigcrypt
/test-byteorder
-/test-crypt-badsalt
/test-crypt-bcrypt
/test-crypt-des
/test-crypt-md5
-/test-crypt-nonnull
/test-crypt-nthash
/test-crypt-pbkdf1-sha1
/test-crypt-sha256