-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.php
More file actions
60 lines (50 loc) · 1.44 KB
/
Copy pathcheck.php
File metadata and controls
60 lines (50 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/*
# File: check.php
# Script Name: vAuthenticate 4.0
# Author: ZYMO
#
# Description:
#
# Hardened version of vAuthenticate 3.0.1 to address exploits
# and update deprecated database functions on PHP v5.5 servers.
#
*/
// Check if the cookies are set
// This removes some notices (undefined index)
if (isset($_COOKIE['USERNAME']) && isset($_COOKIE['PASSWORD']))
{
// Get values from superglobal variables
$USERNAME = $_COOKIE['USERNAME'];
$PASSWORD = $_COOKIE['PASSWORD'];
$CheckSecurity = new auth();
$check = $CheckSecurity->page_check($USERNAME, $PASSWORD);
}
else
{
$check = false;
}
if ($check == false)
{
// Feel free to change the error message below. Just make sure you put a "\" before
// any double quote.
print "<b>Illegal Access</b>";
print "<br>";
print "<b>You do not have permission to view this page.</b>";
// REDIRECT BACK TO LOGIN PAGE
// REMOVE BLOCK IF NOT BEING USED
print "<br>";
print "You will be redirected back to the login page in a short while.";
?>
<HEAD>
<SCRIPT language="JavaScript1.1">
<!--
location.replace("<?php echo $login; ?>");
//-->
</SCRIPT>
</HEAD>
<?php
// END OF REDIRECTION BLOCK
exit; // End program execution. This will disable continuation of processing the rest of the page.
}
?>