<commit_before><?php
require_once 'classes/users.php';
$users = new User();
if(isset($_POST['submit'])) {
  if(hash_equals($_POST['token'], $_SESSION['csrf_token']))
  $username = $_POST['username'];
  $password = $_POST['password'];
  $userinfo = $users->getUser($username,$password);

  if(!$userinfo) {
    echo 'Wrong user or pass';
  } else {
    $_SESSION['userid'] = $userinfo['id'];
    header("Location: index.php");
  }
} else {
  header("Location: index.php");
}<commit_msg>Setting up admin account<commit_after><?php
require_once 'classes/users.php';
$users = new User();
if(isset($_POST['submit'])) {
//   if(hash_equals($_POST['token'], $_SESSION['csrf_token']))
//   $username = $_POST['username'];
//   $password = $_POST['password'];
//   $userinfo = $users->getUser($username,$password);
//
//   if(!$userinfo) {
//     echo 'Wrong user or pass';
//   } else {
//     $_SESSION['userid'] = $userinfo['id'];
//     header("Location: index.php");
//   }
// } else {
//   header("Location: index.php");
$encrypt_pass = crypt($password, '<PASSWORD>');
echo $encrypt_pass;
}
{'fraction_non_alphanumeric': 0.23275068997240111, 'fraction_numerical': 0.0, 'mean_word_length': 4.494949494949495, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '587288', 'n_tokens_mistral': 365, 'n_tokens_neox': 364, 'n_words': 66}