<commit_before>#Use this for User Authentication

<?php
session_start();
$username = $_POST['username'];
$password = $_POST['password'];

$_SESSION["username"] = $username;
$_SESSION["password"] = $password;



if($username == "106114104" && $password == "<PASSWORD>"){
	header("Location: ../html/print.php");
	exit();
}

else{
	header("Location: ../html/wrong.html");
	exit();
}

?><commit_msg>ldap auth<commit_after>#Use this for User Authentication

<?php
session_start();
$username = $_POST['username'];
$password = $_POST['password'];

$_SESSION["username"] = $username;
$_SESSION["password"] = $password;


$host = '10.0.0.39';
$domain = 'octa.edu';
$ad = ldap_connect("ldap://{$host}") or die('Could not connect to LDAP server.');
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ad, LDAP_OPT_REFERRALS, 0);

$result = @ldap_bind($ad, $username.'@'.$domain,$password);
ldap_unbind($ad);
if ($result == TRUE) {
    header("Location: ../html/print.php");
} else {
    header("Location: ../html/wrong.html");
}

?>
{'fraction_non_alphanumeric': 0.22157996146435452, 'fraction_numerical': 0.016377649325626204, 'mean_word_length': 5.926666666666667, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '7021183', 'n_tokens_mistral': 381, 'n_tokens_neox': 364, 'n_words': 73}