[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/tests/tests/auth/ -> auth.php (summary)

(no description)

File Size: 314 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Auth_Func_Tests:: (22 methods):
  setUpBeforeClass()
  tearDownAfterClass()
  test_has_cleartext()
  test_has_no_cleartext()
  test_has_md5()
  test_has_phpass()
  strings_to_hash()
  test_hash_and_check()
  test_valid_cleartext()
  test_valid_md5()
  test_valid_phpass()
  test_hash_passwords_now()
  test_hash_passwords_now_unwritable()
  test_hash_passwords_now_non_existent()
  test_hash_passwords_now_empty()
  test_hash_passwords_now_no_pwd()
  test_hash_passwords_now_bad_content()
  test_hash_passwords_special_chars_now()
  test_maybe_hash_passwords_clear_passwords()
  test_maybe_hash_passwords_no_clear_password()
  test_maybe_hash_passwords_YOURLS_NO_HASH_PASSWORD()
  test_maybe_hash_passwords_via_env()


Class: Auth_Func_Tests  - X-Ref

Auth functions other than login and logout

setUpBeforeClass()   X-Ref
No description

tearDownAfterClass()   X-Ref
No description

test_has_cleartext()   X-Ref
Check that we have some password in clear text


test_has_no_cleartext()   X-Ref
Check that we have no password in clear text


test_has_md5()   X-Ref
Check that user md5 has a MD5 hashed password


test_has_phpass()   X-Ref
Check that users phpass and phpass2 have PHPass'd passwords


strings_to_hash()   X-Ref
Provide strings to hash


test_hash_and_check( $string )   X-Ref
Check that a hash can be verified


test_valid_cleartext()   X-Ref
Check that valid login / clear text password is deemed valid


test_valid_md5()   X-Ref
Check that valid login / md5 password is deemed valid


test_valid_phpass()   X-Ref
Check that valid login / phpass password is deemed valid


test_hash_passwords_now()   X-Ref
Check that in-file password encryption works as expected


test_hash_passwords_now_unwritable()   X-Ref
Check that encrypting un-writable file returns expected error


test_hash_passwords_now_non_existent()   X-Ref
Check that encrypting non-existent or unreadable file returns expected error


test_hash_passwords_now_empty()   X-Ref
Check that encrypting empty file returns expected error


test_hash_passwords_now_no_pwd()   X-Ref
Check that encrypting file with no passwords returns expected error


test_hash_passwords_now_bad_content()   X-Ref
Check that encrypting file with incorrect content returns expected error


test_hash_passwords_special_chars_now()   X-Ref
Check that in-file password encryption works as expected with different kinds of passwords

This test checks that encrypting the config file, with different kinds of pwd, results in a valid
PHP file as expected. It doesn't test that the different kinds of password get correctly hashed
and can be correctly deciphered. This task is covered in test_hash_and_check()

test_maybe_hash_passwords_clear_passwords()   X-Ref
Check that we hash passwords by default


test_maybe_hash_passwords_no_clear_password()   X-Ref
Check that we don't hash passwords in config file if there's nothing to hash


test_maybe_hash_passwords_YOURLS_NO_HASH_PASSWORD()   X-Ref
Check that we don't hash passwords in config file if user explicitly doesn't want it

(Note that we're checking with the filter, it can also be enforced with a constant)

test_maybe_hash_passwords_via_env()   X-Ref
Check that we don't hash passwords in config file if USER/PWD provided by env




Generated: Tue Sep 27 05:10:01 2022 Cross-referenced by PHPXref 0.7.1