• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NathanGibbs3 / BASE / 624

pending completion
624

push

travis-ci-com

NathanGibbs3
Merge branch 'devel'

562 of 562 new or added lines in 28 files covered. (100.0%)

3145 of 17504 relevant lines covered (17.97%)

23.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/index.php
1
<?php
2
/*******************************************************************************
3
** Basic Analysis and Security Engine (BASE)
4
** Copyright (C) 2004 BASE Project Team
5
** Copyright (C) 2000 Carnegie Mellon University
6
**
7
** (see the file 'base_main.php' for license details)
8
**
9
** Project Leads: Kevin Johnson <kjohnson@secureideas.net>
10
**                Sean Muller <samwise_diver@users.sourceforge.net>
11
** Built upon work by Roman Danyliw <rdd@cert.org>, <roman@danyliw.com>
12
**
13
** Purpose: Determines if a login is needed.  If not, will redirect you
14
**  to base_main.php
15
********************************************************************************
16
** Authors:
17
********************************************************************************
18
** Kevin Johnson <kjohnson@secureideas.net
19
**
20
********************************************************************************
21
*/
22

23
$sc = DIRECTORY_SEPARATOR;
×
24
require_once("includes$sc" . 'base_krnl.php');
×
25
include_once("$BASE_path/includes/base_include.inc.php");
×
26
include_once("$BASE_path/base_db_common.php");
×
27

28
$errorMsg      = '';
×
29
$displayError  = 0;
×
30

31
// Redirect to base_main.php if auth system is off.
32
if( $Use_Auth_System == 0 ){
×
33
        HTTP_header('Location: base_main.php');
×
34
}
35
$LoginDesc = _FRMLOGIN;
×
36
$PWDesc = _FRMPWD;
×
37
if( isset($_POST['submit']) ){
×
38
    $BASEUSER   = new BaseUser();
×
39
    $user       = filterSql($_POST['login']);
×
40
    $pwd        = filterSql($_POST['password']);
×
41

42
        if ( $BASEUSER->Authenticate($user, $pwd) == 0 ){
×
43
                HTTP_header('Location: base_main.php');
×
44
        }
45
    $displayError = 1;
×
46
    $errorMsg     = _LOGINERROR;
×
47
}
48

49
PrintBASESubHeader();
×
50
$tmp_str = verify_php_build($DBtype); // Check that PHP was built correctly.
×
51
if( $tmp_str != '' ){
×
52
        BuildError($tmp_str);
×
53
}else{
×
54
        if( $displayError == 1 ){
×
55
                DivErrorMessage($errorMsg, 2);
×
56
        }
57
        $ipt = "<input type='";
×
58
        NLIO("<form action='index.php' method='post' name='loginform'>", 2);
×
59
        NLIO("<table width='75%' style='border:0;padding:0;margin:auto;'>", 3);
×
60
        NLIO('<tr>', 4);
×
61
        NLIO("<td align='right' width='50%'>$LoginDesc:&nbsp;</td>", 5);
×
62
        NLIO("<td align='left' width='50%'>", 5);
×
63
        NLIO($ipt . "text' name='login' autofocus='autofocus' />", 6);
×
64
        PrintTblNewRow(1, 'right', 5);
×
65
        NLIO("$PWDesc:&nbsp;</td>", 5);
×
66
        NLIO("<td align='left'>", 5);
×
67
        NLIO($ipt . "password' name='password' />", 6);
×
68
        PrintTblNewRow(0, '', 5);
×
69
        NLIO("<td colspan='2' align='center'>", 5);
×
70
        NLIO($ipt."submit' name='submit' value='Login' />", 6);
×
71
        NLIO($ipt."reset' name='reset' />", 6);
×
72
        PrintFramedBoxFooter(1, 3);
×
73
        NLIO('</form>', 2);
×
74
}
75
PrintBASESubFooter();
×
76
?>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc