From f431160b67f8204140d31996b0f2965c26763285 Mon Sep 17 00:00:00 2001
From: Sophia Atkinson
Date: Sun, 30 Oct 2022 14:05:51 -0700
Subject: [PATCH] Delete 'auth.php'
---
auth.php | 63 --------------------------------------------------------
1 file changed, 63 deletions(-)
delete mode 100644 auth.php
diff --git a/auth.php b/auth.php
deleted file mode 100644
index d6b95a8..0000000
--- a/auth.php
+++ /dev/null
@@ -1,63 +0,0 @@
- $auth,
- 'message' => $auth,
- 'errorCode' => 403,
- 'callback' => $callback,
- ) );
-
- // Regular mode
- } else {
- yourls_login_screen( $auth );
- }
-
- die();
-}
-
-yourls_do_action( 'auth_successful' );
-
-/*
- * The following code is a shim that helps users store passwords securely in config.php
- * by storing a password hash and removing the plaintext.
- *
- * TODO: Remove this once real user management is implemented
- */
-
-// Did we just fail at encrypting passwords ?
-if ( isset( $_GET['dismiss'] ) && $_GET['dismiss'] == 'hasherror' ) {
- yourls_update_option( 'defer_hashing_error', time() + 86400 * 7 ); // now + 1 week
-
-} else {
-
- // Encrypt passwords that are clear text
- if ( yourls_maybe_hash_passwords() ) {
- $hash = yourls_hash_passwords_now( YOURLS_CONFIGFILE );
- if ( $hash === true ) {
- // Hashing succesful. Remove flag from DB if any.
- if( yourls_get_option( 'defer_hashing_error' ) )
- yourls_delete_option( 'defer_hashing_error' );
- } else {
- // It failed, display message for first time or if last time was a week ago
- if ( time() > yourls_get_option( 'defer_hashing_error' ) or !yourls_get_option( 'defer_hashing_error' ) ) {
- $message = yourls_s( 'Could not auto-encrypt passwords. Error was: "%s".', $hash );
- $message .= ' ';
- $message .= yourls_s( 'Get help.', 'http://yourls.org/userpassword' );
- $message .= '
';
- $message .= yourls_s( 'Click here to dismiss this message for one week.', '?dismiss=hasherror' );
-
- yourls_add_notice( $message );
- }
- }
- }
-}